Hi
I am writing a script that displays information from a database and then stores the unique number for each row of data in a session.
I want to use this session information to display the full row of data on a new page based on the unique number stored in the session.
while($row=mysql_fetch_array($sqlStatement)){
$_SESSION['db_field_unique_key']=$row['db_field_unique_key'];
echo '<a href="view-page.php"> Click here to view all the data in full</>';
}
my problem is that the session only has the last entry of the loop. I figured that this is because every time the loop executes it overrides the previous value of the session
Is there a way that i can give the session variable a unique name every time it goes through the loop.
Or is there another approach i can take to solving this problem
Thanks