"; $status= "NOTOK";} if(!ctype_alnum($userid)){ $msg=$msg."User id should contain alphanumeric chars only
"; $status= "NOTOK";} if(mysql_num_rows(mysql_query("SELECT userid FROM plus_signup WHERE userid = '$userid'"))){ $msg=$msg."Userid already exists. Please try another one
"; $status= "NOTOK";} if ( strlen($password) < 3 ){ $msg=$msg."Password must be more than 3 char legth
"; $status= "NOTOK";} if ( $password <> $password2 ){ $msg=$msg."Both passwords are not matching
"; $status= "NOTOK";} list($EMName, $EMDomain) = split("@",$email); $result = mysql_query("SELECT * FROM Domain"); $found="NO"; while ( $row = mysql_fetch_array($result) ) { if ($EMDomain==$row[email_domain]) { $found="YES"; } } if ($found=="NO") { $msg=$msg."Your email address is invalid or unauthorized to access this page
"; $status="NOTOK"; } if($status<>"OK"){ echo "$msg
"; }else{ // if all validations are passed. $query=mysql_query("insert into plus_signup(userid,password,email,name,sex) values('$userid','$password','$email','$name','$sex')"); echo "Welcome, You have successfully signed up

Click here to login
"; } } ?>