- Joined
- May 22, 2012
- Messages
- 28
- Reaction score
- 0
Error i gotten :
What's in the file :
The last line is line 35.
Help is pretty much appreciated.
Parse error: syntax error, unexpected end of file in C:\xampp\htdocs\site\assets\header.php on line 35
What's in the file :
<? } else {
if (isset($_POST['login'])) {
$u = mysql_real_escape_string(stripslashes($_POST['username']));
$p = mysql_real_escape_string(stripslashes($_POST['password']));
$s = mysql_query("SELECT * FROM `accounts` WHERE `name`='" . $u . "'") or die(mysql_error());
$i = mysql_fetch_array($s);
if ($i['password'] == hash('sha512', $p . $i['salt']) || sha1($p) == $i['password']) {
$users = mysql_query("SELECT * FROM `accounts` WHERE `name`='" . $i['name'] . "' AND `password`='" . $i['password'] . "'") or die(mysql_error());
$auser = mysql_fetch_array($users);
$_SESSION['id'] = $auser['id'];
$_SESSION['name'] = $auser['name'];
echo "<META HTTP-EQUIV=Refresh CONTENT=\"0.2; URL=?page=index\">";
} else {
echo "<div class='invalid'><p>Invalid username or password.</p></div>";
}
}
include("assets/nav.php");
}
The last line is line 35.
Help is pretty much appreciated.

