Jump to content

Pass on Session ID with link...


rx3mer

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.