Hi i have problem in my login code.
Firts someone fill in login informations
this is checking code
// mysql connection
$username=$_POST['username'];
$password=md5($_POST['password']);
$username = stripslashes($username);
$password = stripslashes($password);
$username = mysql_real_escape_string($username);
$password = mysql_real_escape_string($password);
$sql="SELECT * FROM users WHERE username = '$username' and password = '$password'";
$result=mysql_query($sql);
$count=mysql_num_rows($result);
if($count==1){
session_register("username");
session_register("password");
$_SESSION['username']=$username;
header("location:success.php");
and this is part of "success.php" with error
//mysql connection
$username=$_SESSION['username'];
$resulta = mysql_query("SELECT access FROM users WHERE username=$username");
$acces = mysql_result($resulta, 0);
$res=mysql_query("SELECT name FROM access WHERE id=$acces");
$access=mysql_result($res ,0);
and i have error : Warning: mysql_result() expects parameter 1 to be resource, boolean given in /home/users/richard/webgamesnet.g6.cz/web/success.php on line 10
Warning: mysql_result() expects parameter 1 to be resource, boolean given in /home/users/richard/webgamesnet.g6.cz/web/success.php on line 13