Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- How do you test for blank form input?
- Chris Portka
August 18, 2005, 1:54 am
rate this thread
an answer looking on my own. How do you test for no user input in a
<form action="index.php" method="get">
Type your first name:
<input type="text" name="FirstName">
<input type="submit" value="Submit">
if ($_GET["FirstName"] == "")
echo "No user input";
Is this the correct way to always test if there was nothing input by
the user in the form? Should I test for nil or something else?