I have tried plenty of methods already including ones on this site. The echo function works for the words on the .php file but it just ignores the form information. Please could someone tell me where I am going wrong. I am using Google Chrome if that matters. This is the .html file.
<!DOCTYPE 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>
and this is the .php file named welcome.php
<html>
<body>
Welcome <?php echo $_POST["name"]; ?><br>
Your email address is: <?php echo $_POST["email"]; ?>
</body>
</html>
and all it displays after entering information and clicking submit, all it displays is:
Welcome
Your email address is:
I would be very grateful if anyone can help. Thanks in advance.
Say the page name, containing the form, is index.html.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.