Subject: PHP Form Validation
Posted By: mdolan Post Date: 11/17/2004 1:41:10 PM
re Chapter 14 - I want to include form validation for phone number which if the user leaves the phone text box empty, it will come up with an error to highlight that it needs to be filled.
Is there a short and easy way to do this


Reply By: Snib Reply Date: 11/17/2004 2:10:03 PM
if(empty($_POST['your_field_name']))echo "You have to fill in the box!";

hth

-Snib
Where will you be in 100 years?
Try new FreshView 0.2!
Reply By: mdolan Reply Date: 11/17/2004 2:26:40 PM
thanks, worked perfect

quote:
Originally posted by Snib

if(empty($_POST['your_field_name']))echo "You have to fill in the box!";

hth

-Snib
Where will you be in 100 years?
Try new FreshView 0.2!




Go to topic 22081

Return to index page 713
Return to index page 712
Return to index page 711
Return to index page 710
Return to index page 709
Return to index page 708
Return to index page 707
Return to index page 706
Return to index page 705
Return to index page 704