Now what I got here is the script to alert "You have logged in successfully" after correct login information upon filling up the form at index.php...
In my check_login.php these are the scripts... So far
if($count['user_type']== "agent"){
session_register("myusername");
session_register("mypassword");
echo '<script type="text/javascript">window.onload = function() {
alert("You have logged in successfully!
");}</script>';
echo "<meta http-equiv=\"refresh\" content=\"0;URL=pages/agent.php\">";
exit();
//header("location:pages/agent.php");
}
if ($count['user_type']== "moderator"){
session_register("myusername");
session_register("mypassword");
header("location:pages/moderator.php");
}
else {
echo "<script type='text/javascript'>alert('Invalid Login! Please Try Again!');</script>";
echo "<meta http-equiv=\"refresh\" content=\"0;URL=index.php\">";
}
The alert box is totally working but.. I want it to pop up while the background is still visible (index.php) and after clicking OK... it will redirect into a page which is from my code --> to "agent.php"
I used
echo "<meta http-equiv=\"refresh\" content=\"0;URL=pages/agent.php\">";
to redirect a successful logged in user..
But before the redirection process... I want the user to see an alert box.
My point is, how can I make the alert box pop up itself while the background is still visible. I noticed that in Firefox it is in Gray bg while in Chrome and so on... the bg is white...
Please Help. Thanks in Advance :|