Database warning may be session is the problem
am 23.09.2007 07:12:56 von Chris CarterThis might look only like a warning message but it has been bugging me since
quite sometime now. Seek expert advice from the members of this forum
please.
Session at the top of the page;
session_start();
if(!session_is_registered(emailAddress)){
header("location:store-login.php");
}
$_SESSION['email'] = 'emailAddress'
?>
Error on the database:
Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on
MySQL result index 5 in thepath/pagename.php on line 132
My code is:
// database information
include "../includes/conf.php";
$query="SELECT * FROM table WHERE email =
'".mysql_real_escape_string($_SESSION['email']). "'";
$result=mysql_query($query);
$num=mysql_numrows($result);
mysql_close();
{
$1=mysql_result($result,$i,"1");
$2=mysql_result($result,$i,"2");
$3=mysql_result($result,$i,"3");
$4=mysql_result($result,$i,"4");
$5=mysql_result($result,$i,"5");
$6=mysql_result($result,$i,"6");
$7=mysql_result($result,$i,"7");
$8=mysql_result($result,$i,"8");
$9=mysql_result($result,$i,"9");
$10=mysql_result($result,$i,"12");
$11=mysql_result($result,$i,"11");
//$sno=mysql_result($result,$i,"sno");
//$url="../storeDiscription.php?sno=$sno";
}
?>
Please suggest a way out.
Many thanks,
Chris
--
View this message in context: http://www.nabble.com/Database-warning-may-be-session-is-the -problem-tf4503195.html#a12842959
Sent from the Php - Database mailing list archive at Nabble.com.
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php