Hi, I'm having problems implementing PHP sessions. This is what I'm trying to do. I have 3 php files A,B and C. File A has a HTML form which will send the field data a,b,c,d to File B. File B contains the following code excerpt:
$a = $POST['a'];
$b = $POST['b'];
$c = $POST['c'];
$d = $POST['d'];
$SESSION['a'] = $a;
$SESSION['b'] = $b;
$SESSION['c'] = $c;
$SESSION['d'] = $d;
File B also contains another HTML form. The design of this form is dependant upon the variable $a. This form will send the field data e and f to File C. I planned on using $SESSION[] to get the values of a,b,c and d in File C but it doesn't work. I tried using $SESSION[] in File B and it works just fine.
Hope that wasn't too confusing.
I have placed the session_start() above all my php files:
<?php
session_start();
header("Cache-control: private");
?>
I have not used session_register() anywhere in my code. My register_globals have been set to off and I'm currently using PHP version 4.3.4
Could someone help me please?