Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cannot see session variable 1

Status
Not open for further replies.

ZOR

Technical User
Jan 30, 2002
2,963
GB
Maybe I am doing something you cannot do, but I am trying to see a session varaiables value while within a loop.

$i=0;
while ($i < $num) {
$_SESSION['Location'][$i]=mysql_result($result,$i,"Location");
$Location=mysql_result($result,$i,"Location");
$OrderNumber=mysql_result($result,$i,"OrderNumber");
$PWRD=mysql_result($result,$i,"PWRD");
$OrderDate=mysql_result($result,$i,"OrderDate");
$Group=mysql_result($result,$i,"Group");
$Description=mysql_result($result,$i,"Description");
$FujiPartNumber=mysql_result($result,$i,"FujiPartNumber");

// echo "<b>$Description</b><br>Group: $FujiPartNumber<br><hr><br>";

echo '<pre>';
print_r ($_SESSION['Location'][$i]);
echo '</pre>';

$i++;
}

?>


Attempting to see the value of $_SESSION['Location'][$i])as it gets filled. Many thanks
 
have you started the session?
Code:
session_start();

is there anything being returned from the database?
is error reporting switched on?

 
Stupid me. Thanks, have a star. Now the session variable is there, any idea how I can show it in a table posistion?

Have a line:

<td align="center"><font size="1" face="Arial"><strong>IN HERE></strong></font></td>

Wanting to put:
$_SESSION['FPNO'][1]
Where it says in here.

Thanks again
 
Code:
<td align="center"><font size="1" face="Arial"><strong><?=$_SESSION['Location'][$i]?></strong></font></td>
 
Thankyou very much, have a star, I'm back on the road for a while. Regards
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top