I'm the following query to verify the login information posted by the form. But whenever I run the query i get internal server error. I'm not sure what i'm doing wrong.
<?php
if(isset($_POST["userName"]) && isset($_POST["password"])){
$userName = $_POST["userName"];
$password = $_POST["password"];
include "http://evocature.com/scripts/db_connect.php";
$results = mysql_query("SELECT id 
                        FROM admins 
                        WHERE userName = '$userName' 
                        AND password ='$password' LIMIT 1");
$existCount = mysql_num_rows($results);
if($existCount == 1){
    while($row  = mysql_fetch_array($results)){
        $id = $row["id"];   
    }
    $_SESSION["id"] = $id;
    $_SESSION["manager"] = $manager;
    $_SESSION["password"] = $password;
    header("Location: http://www.evocature.com/admin/index.php");
    exit();
}
else{
    echo 'Invalid Information';
    exit(); 
}
}
 
    