I just started learning php today (this is basically copy/pasted from the w3schools tutorial).
This is the html file:
<html>
<body>
<form action="test.php" method="post">
Name: <input type="text" name="name"><br>
E-mail: <input type="text" name="email"><br>
<input type="submit">
</form>
And this is the php file:
<html>
<body>
Welcome <?php echo $_POST["name"]; ?>
<br>
Your email address is: <?php echo $_POST["email"]; ?>
</body>
</html>
I've downloaded xampp but when I try to submit the form, I get the following:
Welcome
Your email address is:
So it seems like $_POST
is empty... any ideas why this might be? Thanks!
EDIT: Moved the files to the xampp htdocs folder, it works now. Thanks everyone!!