arenlor
03-17-2007, 01:08 AM
The code is as follows (I removed my mysql connection stuff, but that all works, it's the header redirect that's giving me an issue, $logum is 1.<?php $user = $_POST['username'];
$pass = $_POST['password'];
$gold = "select username,password from blogs where username=MD5('$user') and password=SHA1('$pass')";
$log = mysql_query($gold);
$logum = mysql_num_rows($log);
if($logum == 1){header("Location:index2.php");} ?>
<p>Please login below, if you don't have a login please <a href="register.php" title="register">register</a>.</p>
<?php echo "<form action=\"$PHP_SELF\" method=\"post\"><input type=\"text\" name=\"username\" id=\"username\" /><input type=\"password\" name=\"password\" id=\"password\" /><input type=\"submit\" value=\"Login\" /></form>"; ?>The page that this is is http://arenblogs.com/login.php The user and pass are 'test' no 's
$pass = $_POST['password'];
$gold = "select username,password from blogs where username=MD5('$user') and password=SHA1('$pass')";
$log = mysql_query($gold);
$logum = mysql_num_rows($log);
if($logum == 1){header("Location:index2.php");} ?>
<p>Please login below, if you don't have a login please <a href="register.php" title="register">register</a>.</p>
<?php echo "<form action=\"$PHP_SELF\" method=\"post\"><input type=\"text\" name=\"username\" id=\"username\" /><input type=\"password\" name=\"password\" id=\"password\" /><input type=\"submit\" value=\"Login\" /></form>"; ?>The page that this is is http://arenblogs.com/login.php The user and pass are 'test' no 's