I need someone's expertise. Once the user is logged in.... I want them to be redirected to another php page if they attempt to go back to the login page. Right now my user can still login but also is able to go back to the login form.
<?php
if(isset($_POST['login'])){
session_start();
$password = $_POST['pass'];
$email = $_POST['email'];
$user_pass= md5($user_pass);
$check_user = "select * from userss where user_pass='$password' AND user_email='$email'";
$run = mysql_query($check_user);
if(mysql_num_rows($run)>0){
$_SESSION['email']=$email;
echo "<script>window.open('welcome.php','_self')</script>";
}
else {
echo "<script>alert('Email or password is incorrect!')</script>";
}
}
?>