joeltonnberg Posted August 9, 2007 Share Posted August 9, 2007 I have a rather simple dynamic table which displays information from a certain column from a database. The code is as follows: <table border="1"> <tr> <td>Name</td> </tr> <?php do { ?> <tr> <td><?php echo $row_Recordset1['Name']; ?></td> </tr> <?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?> </table> However, how do I do so I can click on each row of data that is displayed (so it redirect to another page) and create a session variable with the same value as the data in a particular row displayed? For example, if the Recordset retrieve and display the value "james, when clicked I want to create a session variable named "james". Link to comment https://forums.phpfreaks.com/topic/64043-create-session-variables-in-dynamic-tables/ Share on other sites More sharing options...
gerkintrigg Posted August 9, 2007 Share Posted August 9, 2007 I normally do something like: <a href="index.php?id=<?php =$r['table_id'];?>">link text</a> then when you get to the index.php page, check for the $_REQUEST['id'] variable and take it from there Link to comment https://forums.phpfreaks.com/topic/64043-create-session-variables-in-dynamic-tables/#findComment-319246 Share on other sites More sharing options...
joeltonnberg Posted August 9, 2007 Author Share Posted August 9, 2007 Thanks. However, as I am rather new how more exact would I go about incorporate that into the code I have? Link to comment https://forums.phpfreaks.com/topic/64043-create-session-variables-in-dynamic-tables/#findComment-319253 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.