slj90 Posted January 15, 2010 Share Posted January 15, 2010 HI all, I am trying to create a link that gets the ID from the session and uses it in the link An example: http://localhost/burned/loggedon.php?ID=41 How do I create the link to include the ID number of the user that's currently logged in? $ID = $_SESSION["authenticatedUser"] ; // (2)gather details of CustomerID sent $ID = $_GET['ID'] ; Thanks Link to comment https://forums.phpfreaks.com/topic/188533-link-with-session-id-in/ Share on other sites More sharing options...
calmchess Posted January 15, 2010 Share Posted January 15, 2010 http://localhost/burned/loggedon.php?ID=<?php echo $_SESSION['authID']?> Link to comment https://forums.phpfreaks.com/topic/188533-link-with-session-id-in/#findComment-995336 Share on other sites More sharing options...
trq Posted January 15, 2010 Share Posted January 15, 2010 You can have php automatically append the actual session id to a url but it poses a significant security risk as may your method. Why would you need to pass a value held within the session array through a url? It will be available throughout a users session from within the session array. Link to comment https://forums.phpfreaks.com/topic/188533-link-with-session-id-in/#findComment-995337 Share on other sites More sharing options...
slj90 Posted January 15, 2010 Author Share Posted January 15, 2010 Thank you for your responses, I have no got it working! Link to comment https://forums.phpfreaks.com/topic/188533-link-with-session-id-in/#findComment-995342 Share on other sites More sharing options...
trq Posted January 15, 2010 Share Posted January 15, 2010 Did you read my reply about the security concerns? It also seems a useless piece of functionality. Link to comment https://forums.phpfreaks.com/topic/188533-link-with-session-id-in/#findComment-995344 Share on other sites More sharing options...
tail Posted January 15, 2010 Share Posted January 15, 2010 Did you read my reply about the security concerns? It also seems a useless piece of functionality. I couldn't agree more. Why on earth would you need to pass that through the URL? Link to comment https://forums.phpfreaks.com/topic/188533-link-with-session-id-in/#findComment-995361 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.