Site icon Hip-Hop Website Design and Development

$_SESSION variable not saving on web page refresh or new web page

So I’ve a type that enables the person to pick a metropolis. As soon as chosen, this metropolis is then saved to a $_SESSION variable as such : $_SESSION['city_selected'] = $_POST['location_select'];

This works wonderful as soon as chosen. Once I var_dump($_SESSION); I see my variable completely on after deciding on town and the web page refreshing.

Then, if I transfer to a distinct web page or refresh the identical web page – the var_dump(); returns NULL

I can not seem to determine this out. My PHP session ID would not change.

I’m utilizing WAMP on an area server, and session recordsdata are saving within the tmp folder.

Am I lacking one thing? What the heck is going on?