Jump to content

validation


etsted

Recommended Posts

i am trying to make a validation script. This script return false if i use two or more variables that are empty

 

$usernameErr = $pass1Err = $emailErr = $genderErr = $pass2Err = $wrong_passErr = "";

 

if($emailErr && $usernameErr == "") { echo "right"; } else { echo "wrong"; } // this returns false

 

 

if($usernameErr == "") { echo "right"; } else { echo "wrong"; } // this return true

 

if($emailErr == "") { echo "right"; } else { echo "wrong"; } // this returns true

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...