
if ($user) { if (mysql_num_rows($checksql) < 1) { echo "try again
"; } } ?>
ob_start(); session_start(); include 'connect.php'; $user = $_POST['username']; if ($user) { $pass = md5($_POST['pass']); $checksql = mysql_query("select id,username from myusers where username = '$user' and password = '$pass'"); echo "select id,username from myusers where username = '$user' and password = '$pass'"; if (mysql_num_rows($checksql) > 0) { $checkrow = mysql_fetch_array($checksql); $user = $checkrow[1]; $id = $checkrow[0]; $_SESSION['id'] = $id; mysql_query("update myusers set lastlogin = now() where username = '$user' and id = '$id'"); $_SESSION['approved'] = 'yes'; header("location: adminindex.php"); } } ?>
