Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Empty Form Field Validation

Author  Topic 

Palermo
Starting Member

25 Posts

Posted - 2013-12-24 : 20:50:25
I have created a form with basic validation :


if($formValue['forename']=="" || $formValue['surname']=="" || $formValue['username']=="" || $formValue['password']=="" || $formValue['email']=="" ){
$message = "Missing data - please try again" ;
header("Location: registration.php?message=$message");


I want to validate each field individually. Could someone give an example using one of the fields above?

cgraus
Starting Member

12 Posts

Posted - 2013-12-27 : 04:49:37
You just do an 'if' statement for each form value, and return a message that is more specific.

This has nothing to do with SQL Server, but it's so obvious, I never do PHP and the answer was still obvious to me.
Go to Top of Page
   

- Advertisement -