The Issue:
Undefined POST variables after form submission.
Research and Troubleshooting Done:
Edit:
You are using PHPStorm's built-in web server, which has some issues right now especially with POST requests, e.g. WEB-17317. You can also refer to this answer in this respect.
And that might be the reason you were unable to process your form.
http://localhost/signup.html
should be accessible via browser.http://localhost/signup.html
.
Now, you can use the green button in PHPStorm to run your HTML/PHP files and it will open these files in your browser with the url you configured in Step 1. And you should be able to process your forms without any issue.
echo $_SERVER["REQUEST_METHOD"] == "POST"
prints 1
when written in register.php file which means that your form is being submitted successfully.post_max_size
in your php.ini is set in #M format, e.g. 10M
, any other format like 10MB
is invalid. Refer php.net.echo file_get_contents("php://input");
displays data in format: first_name=John&last_name=Doe ....
. Refer php.net.var_dump($_POST)
displays form data in an array.Hopefully, it helps you. Feel free to comment.