doreact for $_POST in php code example
Example 1: var_dump _post php
<?php print_r($_POST); ?>
Example 2: php post
<form method="post" action="<?php echo $_SERVER['PHP_SELF'];?>">
Name: <input type="text" name="fname">
<input type="submit">
</form>
<?php
if ($_SERVER["REQUEST_METHOD"] == "POST") {
// do logic
$name = $_POST['fname'];
}
?>