I have some code that runs fine on one web site and if I use the same code on another site the variables are empty when I get to the second page.
Example: Site One
if (!$error) {
$SESSION['number_drivers'] = $POST['number_drivers'];
$SESSION['number_vehicles'] = $POST['number_vehicles'];
$SESSION['current_insurance'] = $POST['current_insurance'];
$SESSION['current_company'] = $POST['current_company'];
$SESSION['refferal'] = $POST['refferal'];
session_write_close();
// go to step two
header('Location: http://www.mywebsite.com/auto_quote2.php');
exit;
}
Example: Site Two
if (!$error) {
$SESSION['number_drivers'] = $POST['number_drivers'];
$SESSION['number_vehicles'] = $POST['number_vehicles'];
$SESSION['current_insurance'] = $POST['current_insurance'];
$SESSION['current_company'] = $POST['current_company'];
$SESSION['refferal'] = $POST['refferal'];
session_write_close();
// go to step two
header('Location: http://www.myotherwebsite.com/auto_quote2.php');
exit;
}
The sites are hosted by different companies.
On site #1 everything runs just fine but on site #2 the saved session variables get lost.
I notice when I ran phpinfo() on both of them that on site #1 the session.save_path is set at no value while on site #2 it is set as C:\WINDOWS\Temp
Is this the reason I can't find the session variables on site #2 and if so how can I retrieve them?
Any help will be greatly appreciated.