 <p>try changing this:</p> <pre><code>$sql = mysql_query("SELECT id FROM admin WHERE username='$manager' AND password=$password' LIMIT 1"); </code></pre> <p>to this:</p> <pre><code>$sql = "SELECT id FROM admin WHERE username='$manager' AND password='$password' LIMIT 1"; $result = mysqli_query($conn, $sql); </code></pre> <p>or this:</p> <pre><code>$sql = "SELECT id FROM admin WHERE username='$manager' AND password='$password' LIMIT 1"; $result = $conn-&gt;query($sql); </code></pre> <p>($conn is the connection variable change it if it different.) hope this helps out. </p> <p>also change <code>mysql_fetch_array($sql)</code> to <code>mysqli_fetch_array($sql)</code></p>