When I try to transfer the form data to PHP file with this code:
index.html (the form):
<!DOCTYPE html>
<html>
<body>
<form action="welcome.php" method="post">
First name:<br>
<input type="text" name="fname" value="Mickey">
<br>
Last name:<br>
<input type="text" name="lname" value="Mouse">
<br><br>
<input type="submit" value="Submit">
</form>
</body>
</html>
and the welcome.php is:
<!DOCTYPE html>
<html>
<body>
Welcome <?php echo $_POST["fname"]; ?><br>
Your email address is: <?php echo $_POST["lname"]; ?>
</body>
</html>
when I press on the submit button I get the "welcome.php" content back:
why? and how could I fix it ?