Hello, you freaks!
In the following code--which works on the hosted production site (sometimes), by the way--does not seem to work on the test server. In this case, the test server is my humble laptop running Apache 2.2.4 and PHP 5, the latest stable release as of about a week ago.
This must be an error common to newbies like me, so I'm counting on your collective experience to help with my profound information deficit.
The thought here is that the form appears only if the Submit button has not be click; that is, it is not 'set'. However, once the Submit button is clicked, the variable $submit is set and the form disappears, revealing only the message stating the obvious. A very useful page, you see!
The name of the page is 'test.php' and as you see from the form action, it calls itself.
<?php
if (isset($submit))
{
?>
<form action="test.php" method="post">
<p>
First Name: <input name="firstname" type="text"><br />
Last Name: <input name="lastname" type="text">
<input name="submit" type="submit" value="Send">
</p>
</form>
<?php
}
else
{
echo "You Hit SUBMIT!"; // You mother should be proud!
}
?>
Like I said before, it works on the production site, but not on my test server. I will add that the PHP engine appears to be working, as it will handle other PHP code just fine.
Also, when I use is_null() in place of isset(), I seem to have fewer issues on the production server, but it still doesn't work on the test server.
Thanks,
Robert Nicholas