Просмотр файла enter.asp

Размер файла: 670B
<?php

/**
 * @author ByUNNAMED
 * @copyright 2012
 */

ob_start();

include('system/include/settings.inc');//Потключаемся к базе

$log = htmlspecialchars(stripslashes(addslashes($_POST['name'])));
$pass = htmlspecialchars(stripslashes(addslashes($_POST['pass'])));
$pass=md5($pass);
$req = mysql_query("SELECT * FROM `users` WHERE `usr` = '$log' and `pass`='$pass' LIMIT 1");
$avto = mysql_num_rows($req);
if ($avto==1){
$pass =  trim($pass);
$_SESSION['log']=$log;
$_SESSION['pass']=$pass;
header ('Location: modules/character/choosing.asp?');
}else {
header ('Location: index.asp?error');exit;
}       
ob_end_flush();
?>