First of all, thanks for the generous help you guys have given me in the past on this forum. Second, I apologize in advance if my code is hard to read, most of it was done in a rush.
</body> </html> login_process.php Code: <?php if ($_COOKIE['xsrf['.$_POST['xsrfi'].']'] !== $_POST['xsrf'] || !isset($_COOKIE['xsrf['.$_POST['xsrfi'].']'])): $errors = "It appears you have been a victim of a browser attack! Please run a virus scan before continuing online activities.;".$_COOKIE['xsrf['.$_POST['xsrfi'].']'].";".$_POST['xsrfi'].";".$_POST['xsrf']; setcookie('xsrf['.$_POST['xsrfi'].']', sha1($hash), time()-1, '/citizen/', '.ch4n.net'); header("Location: login.php?errors=$errors"); endif; setcookie('xsrf', sha1($hash), time()-1, '/citizen/', '.ch4n.net'); require('authent.php'); $user = mysql_escape_string(htmlentities($_POST['username'])); $pass = mysql_escape_string(htmlentities($_POST['password']));
$passwordhash = hashPassword($pass);
if(table_exists("user_".$user, 's2zsl9rx_citizen')): // Make a MySQL Connection require('c2db.php'); mysql_select_db("s2zsl9rx_citizen") or die(mysql_error());
$result = mysql_query("SELECT * FROM user_$user WHERE type='001'") or die(mysql_error());
else: $errors = 'Username and/or password are incorrect'; header("Location: login.php?errors=$errors"); endif; ?> Any help at all would be very much appreciated