Hello,
I'm having some problems with my session variables. I'm still new to sessions and php, so I'll try to explain clearly what I've done.
I have a form submitting 3 arrays to my page. When the arrays are submitted, I turn them into comma delimited strings and then try to add them to session variables. After that, I call the session variables to use in my sql query.
Everything works fine on the first attempt. But after that, any time I refresh the page, the variables are lost. And if I got back to the form, the old info is submitted no matter what I do. Here's my code so far...
if ($intLocationID) {
$sessLocations = implode(',',$intLocationID);
$sessSemesters = implode(',',$intSemesterID);
$sessBusinessTypes = implode(',',$intBusinessTypeID);
session_start();
session_register('sessLocations','sessSemesters','sessBusinessTypes');
}
Am I doing something wrong with the way I add my session variables? I just call them using $sessLocations, etc. I can't seem to figure it out.
Any help is greatly appreciated.
Thanks,
Wil