In this Ajax Registration program you will learn how to validate the user registration through ajax call and then display the alert massage if no values are provided in the username and password fields.
When a user input user Id and password and press Register button , method 'call_Register()' will make ajax call. If the value returned from the server is "yes" the alert box will show 'Welcome for Register' otherwise it will show ' the Invalid Id/password please enter the Id/password!'.
Example of Ajax Registration program:
Here this code support the Register.php for Ajax Registration program:
$loginid=$_GET["loginid"];
$password=$_GET["password"];
if( $password == "" || $loginid == "" || ($loginid == "" && $password == "") ){
echo "no";
}
else{
echo "yes";
}
?>
0 comments:
Post a Comment