if (!isset($_POST['userName'])){
echo "Username is not filled in";
exit();
}
if (!isset($_POST['email'])){
echo "E-mail is not filled in";
exit();
}
However, this code does not print anything when the fields are left empty. No errors are displayed also. Any help, please?
3 replies to this topic
#1
Posted 04 July 2011 - 03:56 AM
Hi, i use this code to check if both fields of form are filled in:
|
|
|
#3
Posted 04 July 2011 - 07:49 AM
thanks a lot. that works
#4
Posted 05 July 2011 - 08:02 PM
You would benefit from creating your own functions to verify if the email or user name is set, and not empty. I believe there is an is_email or similar function to do this for you, feel free to look in the manual.
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account


Back to top









