hi im following a tutorial and when i went to test the login i press login but nothing happens can anyone check the code as i cant se whats up with the form

<?php
session_start();

include("includes/database.php");
if(isset($_POST['login'])) {

    $email = mysqli_real_escape_string($con,$_POST['email']);
    $pass = mysqli_real_escape_string($con,$_POST['pass']);

    $get_user = "SELECT * FROM users WHERE user_email='$email' AND user_pass='$pass'";

    $run_user = mysqli_query($con,$get_user);

    $check = mysqli_num_rows($run_user);

    if($check==1) {
        $_SESSION['user_email']=$email;
        echo "<script>window.open('home.php','_self')</script>";

    } 
    else {
        echo "<script>alert('the email or password you entered is incorrect please try again!')</script>";
    }
}
?>
<form action="" method="post">
<table>
<tr>
<td>Email Address</td><td><input type="text" id="email" name="email" placeholder="Email Address" required="required" /></td>
</tr><tr>
<td>Password</td><td><input type="password" id="pass" name="pass" placeholder="Password" required="required" /></td>
</tr><tr>
<td colspan="2"><input type="submit" value="Login" id="login" name="login" /></td>
</tr>
</table>
</form>

any help would be much appreciated

sorted it out :) i had the section in header.php file and i had to remove the code and put link instead

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.