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

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Register Now and get your question answered!
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Empty Form Field Validation
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

25 Posts

Posted - 12/24/2013 :  20:50:25  Show Profile  Reply with Quote
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?

Edited by - Palermo on 12/24/2013 21:08:04

Starting Member

12 Posts

Posted - 12/27/2013 :  04:49:37  Show Profile  Reply with Quote
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
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000