Unable to connect to the database server at this time.

" ); exit(); } mysql_select_db("db_ticket",$db); if (! @mysql_select_db("db_ticket") ) { echo( "

Unable to locate the directory database at this time.

" ); exit(); } $result = mysql_query("SELECT * FROM tickets_users",$db); //Authenticate User while($row = mysql_fetch_array($result)) { // IF USER IS AUTHENTICATED THEN SET SESSION VARIABLES if(strtolower($_POST['login']) == $row['tickets_users_username'] && $_POST['pword'] == $row["tickets_users_password"]){ $row['tickets_users_username']; // Set session variables $_SESSION['stu_username'] = $row['tickets_users_username']; $_SESSION['stu_password'] = $row['tickets_users_password']; $_SESSION["stu_type"] = $row["tickets_users_admin"]; // If the username and password are the same // send user to change password page if($_SESSION['stu_username'] == $_SESSION['stu_password']){ echo ""; exit; } else{ // Else send user to index2.php page echo ""; exit; } } /*else{ echo ""; }*/ } } ?>