I'm having trouble getting data into my php program via $_Post. I'm using XAMPP localhost to test with.
I have the following code (the HTML is copied from a book - "Beginning PHP and MySQL):
<?php
// This is just simple code to test getting data via the $_Post
$name = $_Post['name'];
echo ("The name is $name");
echo $_Post['name']
?>
The above is stored in the file "subscribe.php" in the xampp's htdocs folder.
<form action="subscribe.php" method="post" />
<p>
Name:<br />
<input type="text" id="name" name="name" size="20" maxlength="40" />
</p>
<p>
Email Address:<br />
<input type="text" id="email" name="email" size="20" maxlength="40" />
</p>
<input type="submit" id="submit" name="submit" value="Go!" />
</form>
When the above html is executed, the php module gets called as it should, but the $_Post superGlobal is empty. Al that diaplays from the first "echo" is "The name is", and nothing displays from the second one. Can anyone please tell me what I'm doing wrong?