I'm having an issue passing variables from page to page. it works fine until I submit a form and then it just wipes off all registered variables. here is the code that Im using:
<?php
global $fname;
global $lname;
global $user;
global $pass;
session_start();
$module = "Section 1021 - Module 1";
session_register('module');
if (!isset($user)) {
ini_set("include_path","path");
include_once('Login.php');
}
$print = <<<EOA
<form name="Module_1" action="1021_M1_p.php" method="POST">
<font face="Arial, Helvetica, sans-serif">
<b>1. Which of the following best describes the data included in a Crash Data Component of a TSIS</b><br /><br />
<input type="radio" name="question_1" value="choice_a"> A. Information on the crash event, its location, and its environment; as well as the persons and vehicles involved in the crash.<br />
<input type="radio" name="question_1" value="choice_b"> B. Information on the crash event, its location, and its environment.<br />
<input type="radio" name="question_1" value="choice_c"> C. Information on the persons and vehicles involved in the crash.<br />
<input type="radio" name="question_1" value="choice_d"> D. Information on the crash event and its location.<br /><br />
<b>2. T or F, A typical Crash Data Component is likely to contain data on every crash regardless of severity.</b><br /><br />
<input type="radio" name="question_2" value="true"> True<br />
<input type="radio" name="question_2" value="false"> False<br /><br />
<b>3. Which of the following are typical uses of crash data?</b><br /><br />
<input type="radio" name="question_3" value="choice_a"> A. Identify safety problems and traffic safety trends.<br />
<input type="radio" name="question_3" value="choice_b"> B. Identify problem drivers.<br />
<input type="radio" name="question_3" value="choice_c"> C. To evaluate safety programs and respond to inquires.<br />
<input type="radio" name="question_3" value="choice_d"> D. All of the Above.<br /><br />
<b>4. T or F, Without reliable crash data, the value and utility of most of the other components are severely limited.</b><br /><br />
<input type="radio" name="question_4" value="true"> True<br />
<input type="radio" name="question_4" value="false"> False<br /><br />
<b>5. T or F, Duplication of data entry is key to ensuring high quality data in the Crash Data Component.<br /></b><br />
<input type="radio" name="question_5" value="true"> True<br />
<input type="radio" name="question_5" value="false"> False</font><br /><br />
<input type="submit" name="submit" value="Submit">
<input type="reset" name="reset" value="Reset">
</form></td>
</tr>
EOA;
print($print);
?>
when it passes the form variables to 1021_M1_p.php Im unable to use the any of the variables I set global ($user, $pass, $fname, and $lname).
Any Ideas would be greatful!!!
Thanks,
Eric