I just installed XAMPP with PHP 7. I had a script that worked before, but after installing there is an error. I will show an example which is also not working. The problem is in $_POST, I think it can be because of configurations in XAMPP or PHP.
<?php
echo "<form action='check.php' method=\"post\">
<input type=\"text\" name=\"name\" >
<input type=\"submit\" name=\"submit\" value=\"ok\">
</form>";
if (isset($_POST['submit'])){echo $_POST['name'];}
if (isset($_POST['name'])) var_dump($_POST['name']);
?>
This code doesn't return anything, but if I just add echo $_POST['name'];
it returns error "Notice: Undefined index: name in D:\XAMPP\php\www\index.php on line 13". How can I fix it?