here is my code: [code] if (!get_magic_quotes_gpc()) { $_SESSION['username'] = addslashes($_SESSION['username']); } $name = $_SESSION['username']; $query = "SELECT user_pass FROM general_users WHERE user_name = '{$name}'"; $pass = mysql_query($query); $password = mysql_result($pass, 0, 'user_pass'); // line 28 $_SESSION['password'] = stripslashes($_SESSION['password']); [/code] here is my error [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]Warning: mysql_result(): Unable to jump to row 0 on MySQL result index 4 in W:\www\connect.php on line 28[/quote] What this code is suppose to do is keep you logged in using sessions. This doesn't make sense to me because I use the same exact code to log in and it doesn't give an error, and the first time the page runs after you log in it doesn't give an error. Does anyone know what the problem is?