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

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

Palermo
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

cgraus
Starting Member

Australia
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  
 New 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.03 seconds. Powered By: Snitz Forums 2000