Just something small and I'm not sure how to do it. What I want to do when the user cannot be found in my DB then it should:
1. Print out -I wanted to use a pop-up to inform the user that he has entered incorrect log in details. Which I echo'ed with Javascript
2. Then after the popup the user should return to the Login.html. Because currently it just executes the header function straight without acknowledging the echo
Below: Login.php
if(mysql_num_rows($result)){
$user = mysql_fetch_assoc($result);
echo '<h1>Welcome, ';
echo $user['Name'];
echo '</h1>';
}else{
echo "<script type='text/javascript'>alert('Please enter your correct account details');</script>";
header("location:login.html?msg=$msg");
}
I'm a bit new with the whole php thing-still learning! :)
Any help will be appreciated!
Thanks