Testy prosze przeprowadzac pod tym adresem (jest tez zaladowany phpinfo(); ) http://195.211.2.7/
Konto probne: login(test) passwd(test)
A tu kod strony:
<?php if ( $_SESSION['auth'] != 1 ) $_SESSION['auth'] = false; function login( $login, $passwd ) { $query = mysql_query( "SELECT * FROM `account` WHERE `login`='$login' AND `passwd`='$passwd' LIMIT 1" ); if ( $mysql_num_rows( $query ) ) { $_SESSION['auth'] = true; $_SESSION['account-id'] = $row['id']; $_SESSION['account-name'] = $row['name']; $_SESSION['account-email'] = $row['email']; } } /* $login = md5( 'test' ); $passwd = md5( 'test' ); $name = 'Test'; $email = 'test@test.test'; $data = time(); mysql_query( "INSERT INTO `account` VALUES ( NULL, '$login', '$passwd', '$name', '$email', '$data' )" ); */ ?> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <style type="text/css"> * { font-family: "DejaVu Sans", Verdana; font-size: 13px; color: #777777; } input, textarea { border: 1px solid #dddddd; background-color: #eeeeee; } form { margin: 0px; padding: 0px; } .package { width: 780px; margin: 0px auto; } .login { width: 140px; margin: 0px auto; } .align-right { text-align: right; } .align-center { text-align: center; } .width-90 { width: 90%; } .move-little-lower { margin-top: 2px; } </style> <div>Test kroju czcionki</div> <div class="package"> <?php if ( ! $_SESSION['auth'] ) include( 'login.htm' ); else ?> </div>