View file test.php

File size: 747B
<?php

session_start();

$db['host']='localhost'; 
$db['user']='hrum213_test'; 
$db['pass']='test'; 
$db['db']='hrum213_test'; 

mysql_connect($db['host'],$db['user'],$db['pass']) or die('Нет подключения к базе данных!');
mysql_select_db($db['db']) or die('Нет подключения к базе данных!');
mysql_query('SET NAMES `utf8`');

$sql = mysql_query("SELECT * FROM `users` WHERE `login`='".mysql_real_escape_string(htmlspecialchars($_SESSION['login']))."' AND `password`='".mysql_real_escape_string(htmlspecialchars($_SESSION['pass']))."'");
$s = mysql_fetch_array($sql);

if(empty($s['status'])){ $s['status']=0; }

if($s['status'] >= 1){
echo 'status >= 1';
}

echo '<br/>'.$s['status'].'-status';

?>