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


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) {
        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">
<td>Email Address</td><td><input type="text" id="email" name="email" placeholder="Email Address" required="required" /></td>
<td>Password</td><td><input type="password" id="pass" name="pass" placeholder="Password" required="required" /></td>
<td colspan="2"><input type="submit" value="Login" id="login" name="login" /></td>

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.