Jump to content

assigning an integer as session name


suzzane2020

Recommended Posts

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..
in my page where i create the session


i 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 session

if(isset($_SESSION[$hid]))
it returns false

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.