I am new to php programming. I have been trying to learn from w3 schools. I have installed phpstorm on my mac. I have been learning forms. the code is below
Form:
<form action="welcome.php" method="post">
Name: <input type="text" name="name" id="name"> <br>
E-mail: <input type="text" name="email" id="email"><br>
<input type="submit">
</form>
Message board:
Welcome <?php echo $_POST["name"]; ?><br>
Your email address is: <?php echo $_POST["email"]; ?>
When I try and use post on the form, I get an error
Welcome
Notice: Undefined index: name in /Users/chris/PhpstormProjects/three/welcome.php on line 4
Your email address is:
Notice: Undefined index: email in /Users/chris/PhpstormProjects/three/welcome.php on line 5
But when I use get the code works perfectly. I use a Mac, I have tried changing from MAMP to XAMPP, have run the code in xampp and mamp and still nothing happens. I am all out of ideas, can anyone help ?
Update
This is not like any other problem on stack overflow ( believe me I've checked :-) )
From what can see , the HTML form is not writing to post which is odd as thats what I thought it should do , has anyone else come across this in phpstorm ?
Many thanks again