0

I'm having some trouble setting up a basic php form submission. Using the following code:

index.html:

<html>
<body>

<form action="welcome.php" method="post">
Name: <input type="text" name="name"/><br>
E-mail: <input type="text" name="email"/><br>
<input type="submit">
</form>

</body>
</html>

With the following php on the welcome php page.

Welcome <?php echo $_POST["name"]; ?><br>
Your email address is: <?php echo $_POST["email"]; ?>

</body>
</html>

The index page displays two forms with text fields which may be typed in, however when imputing text and clicking submit it takes me to the php page without sending any of the data.

Description is a bit vague, here is a gif to show what is happening: https://gyazo.com/aa1c9df6b090600cbc403151df49f0e3

4
  • 1
    odd your running a php server? Commented Aug 20, 2017 at 5:15
  • Your code is working fine Commented Aug 20, 2017 at 5:17
  • stackoverflow.com/questions/18238342/… Commented Aug 20, 2017 at 5:18
  • You have installed the php or your local server (localhost) or online? Commented Aug 21, 2017 at 23:18

0