patelp7 Posted March 9, 2007 Share Posted March 9, 2007 I am trying to store the "subject" that the user selects and output the specific deatils of the subject on viewspecificbull.php. But it is only storing the last subject. How do make it store the selected subject and not the last subject? while ($numofsubs = mysql_fetch_array($result)) { //echo <td align="left"><a href="viewspecificbull.php?id=' . $numofsubs['Subject'] . '">View</td></br> echo ('<td align="left">' . $numofsubs['Subject'] . '</td> <td align=left><a href="viewspecificbull.php?id=' . $numofsubs['Subject'] . '">View Subject: </a></td></br>'); $_SESSION['Subject']= $numofsubs['Subject']; } Link to comment https://forums.phpfreaks.com/topic/42025-storing-a-field-in-a-loop/ Share on other sites More sharing options...
s0c0 Posted March 10, 2007 Share Posted March 10, 2007 Try posting more code and please put it in the code tags. I don't see your mysql query or where you are getting some of these variables from. Link to comment https://forums.phpfreaks.com/topic/42025-storing-a-field-in-a-loop/#findComment-204146 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.