suzzane2020 Posted January 22, 2007 Share Posted January 22, 2007 i came upon this issue when i tried to assign an integer as a session name.The session kept being overwritteni guess session names cannot comprise of just integers..is tht so? Link to comment https://forums.phpfreaks.com/topic/35211-assigning-an-integer-as-session-name/ Share on other sites More sharing options...
trq Posted January 22, 2007 Share Posted January 22, 2007 As far as I can tell it should be possible. Im unable to test it atm though. Can I ask why you would want numeric keys? It doesn't seem real plausable. Link to comment https://forums.phpfreaks.com/topic/35211-assigning-an-integer-as-session-name/#findComment-166263 Share on other sites More sharing options...
trq Posted January 22, 2007 Share Posted January 22, 2007 Just tested it and it works fine. Can we see some code? Link to comment https://forums.phpfreaks.com/topic/35211-assigning-an-integer-as-session-name/#findComment-166265 Share on other sites More sharing options...
suzzane2020 Posted January 22, 2007 Author Share Posted January 22, 2007 was this program for hotel ratings ...and a user should not rate the same hotel twice..here i assignd the hotelid as session name and did a session existing checkin...but cud not as the session was being overwritten..but tried hotelnames instead and it was fine...i tried this witha lot of xamples n got te same result..i searched te web for a hint tht this mite nt be possible..but never gt one.. Link to comment https://forums.phpfreaks.com/topic/35211-assigning-an-integer-as-session-name/#findComment-166267 Share on other sites More sharing options...
suzzane2020 Posted January 22, 2007 Author Share Posted January 22, 2007 in my page where i create the sessioni get the hotelid by GET method and assign that as the session name$hid=$_GET["hid"];SESSION_REGISTER[$hid];in the second page i get the same hotel id when te user tries to vote for the same hotel$hid=$GET["hid"];n then when i check for the existence o the sessionif(isset($_SESSION[$hid]))it returns false Link to comment https://forums.phpfreaks.com/topic/35211-assigning-an-integer-as-session-name/#findComment-166271 Share on other sites More sharing options...
trq Posted January 22, 2007 Share Posted January 22, 2007 session_register() has long been depricated and should no longer be used. Are you putting a call to session_start() at the top of all pages? Link to comment https://forums.phpfreaks.com/topic/35211-assigning-an-integer-as-session-name/#findComment-166279 Share on other sites More sharing options...
suzzane2020 Posted January 23, 2007 Author Share Posted January 23, 2007 yes iam using session_start()session_register is no longer used? what is used instead? could u give me a link where i can ind these updates Link to comment https://forums.phpfreaks.com/topic/35211-assigning-an-integer-as-session-name/#findComment-167004 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.