Hi
I am creating login page with validation.
i have index.php page with login box, for validating this login detail i m redirecting to login_validate. php.
Login_validate. php file code:
now what i want to do is i want to display alert box if the user detail is not true,
Can some one help me how to display alert box in that echo field please, i tried java script but, error in that.
Regards
magesh
I am creating login page with validation.
i have index.php page with login box, for validating this login detail i m redirecting to login_validate. php.
Login_validate. php file code:
Code:
<?php include ("config/config.php"); $dbtable = "users"; $resultvalue =0; $username = $_POST['usr_name']; $password = $_POST['usr_pass']; $result = mysql_query("SELECT * FROM $dbtable where user_name = '".$username."' and password = '".$password."'"); $resultvalue = mysql_num_rows($result); $result; if($resultvalue>0) { echo "<script>window.location='home.php'</script>"; } else { echo "****************** Alertbox [error msg]**************"; //echo "<script>window.location='error.php'</script>"; } mysql_close(); ?>
Can some one help me how to display alert box in that echo field please, i tried java script but, error in that.
Regards
magesh
Comment