rx3mer Posted November 24, 2013 Share Posted November 24, 2013 Hi guys, I am trying to pass an ID with a session to another page. -------- ID: 10 - edit link -------- ID: 11 - edit link -------- ID: 12 - edit link -------- The problem that I am having is that the session stored is always the last ID, in this case 12. $info["HostID"]; comes from the DB. <?php $link = $info["HostID"]; echo '<td><a href="edit.php?id='.$link.'">Edit</a></td>'; ?> <?php if(isset($_GET['$link'])){$_SESSION['hostid'] = $_GET['$link'];} ?> Any suggestions? Link to comment https://forums.phpfreaks.com/topic/284229-pass-on-session-id-with-link/ Share on other sites More sharing options...
rx3mer Posted November 25, 2013 Author Share Posted November 25, 2013 Problem solved. Had to pass on the ID with GET and then I can store it in a session. Link to comment https://forums.phpfreaks.com/topic/284229-pass-on-session-id-with-link/#findComment-1459915 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.