Am using the code below in order to print the values that am inserting on the boxes. However After I put the values and click submit nothing is printing out.
<html>
<body>
<form action="<?php $_SERVER['PHP_SELF']?>" method="post">
Name: <input type="text" name="name"><br>
E-mail: <input type="text" name="email"><br>
<input type="submit">
</form>
<?php
if(isset($_POST["submit"])) {
$name = filter_input(INPUT_POST, 'name');
$email = $_POST['email'];
echo $name;
echo $email;
}
?>
</body>
</html>
About below I tried both cases because on the simple one $_POST['email'] I was getting a warning:
$name = filter_input(INPUT_POST, 'name');
$email = $_POST['email'];
Warning:
Do not Access Superglobal $_POST Array Directly
I am using Netbeans IDE 8.2.