Issues with POST

So I am currently a student learning web development and I am using phpStorm to develop, php, I have used webstorm before and it is quite good. Now, my issue is as follows, and this appears to be an issue other folk are having as well, but I am not able to find a proper solution. So, post does not seem to work at all, get does. Below is the code that is currently in question: 

 

this is from matches.php:

 

<form method="post" action="matches-submit.php">
<fieldset>
<legend>Returning User:</legend>
<ul>
<li><label><strong>Name:</strong></label>
<input id="name" name="name" type="text" size="16">
</li>
<li>
<input id="submit" name="submit" type="submit" value="Sign Up">
</li>

</ul>
</fieldset>

</form>

And this is from matches-submit.php:

<html>
<body>
Welcome
<?php
echo $_POST["name"];
?>
</body>
</html>


What I expect it to do is to print out Welcome, and then the name. Instead it throws an error message saying undefined index.
Many of the solutions I saw on the web mention changing Phpstorms default web server to your own. Problem is, as a novice none
of this makes sense. I am using MAMP on my mac, and thus far it seems as though all it really is useful is the php interperter.

How can I fix this problem?



0
3 comments
Avatar
Permanently deleted user

Hello,

Do you actually use Apache that comes with MAMP as a web server? Or do you use a PHP built-in web server?

There is a known issue for PHP built-in web server but it should not be the case for Apache.

It's easy to determine that - just check the browser's address bar while working with pages from PhpStorm. "localhost:63342" (default port value) means that you use built-in server that comes with PHP interpreter.

0
Avatar
Permanently deleted user

Is there an expected fix due date for the POST issue mentioned above?

0

Please sign in to leave a comment.