hello everybody,
i have read through a lot of other postings in regards to forums, and I think i might have a basic syntax issue that i'm missing.
what i'm developing is a customer form which will enter ALL variables in to my database, however I would also like to store 5 of the variables as sesssions which will then pass to my credit card validation area where they then securely enter their billing info.
here is what i have:
<?php
session_start();
//header("Cache-control: private");
session_register('fname');
if ($submit) {
// process form
$db = mysql_connect("localhost", ".......", ".......");
mysql_select_db(".......",$db);
$sql = "INSERT INTO individual (fname,lname,address,city,state,UMzip,country,email,emergency,sex,age,race,waiver) VALUES ('$fname','$lname','$address','$city','$state','$UMzip','$country','$email','$emergency','$sex','$age','$race','$waiver')";
$result = mysql_query($sql);
$fname = $_POST['fname'];
header ("Location: [url]https://......../test/test.php[/url]");
} else{
// display form
?>
<table border="2"><tr><td>
<form method="post" action="<?php echo $PHP_SELF?>" onSubmit="return Validator(this);">
<table border="0">
<tr><td>First Name: </td><td><input type="Text" name="fname">
</td></tr>
<tr><td>Last Name: </td><td><input type="Text" name="lname"></td></tr>
<tr><td>Address: </td><td><input type="Text" name="address"></td></tr>
<tr><td>City: </td><td><input type="Text" name="city"></td></tr>
<tr><td>State: </td><td><input type="Text" name="state"></td></tr>
<tr><td>Zipcode: </td><td><input type="Text" name="UMzip"></td></tr>
<tr><td>Country: </td><td><input type="Text" name="country"></td></tr>
<tr><td>Email: </td><td><input type="Text" name="email"></td></tr>
<table>
<tr><td><b>Waiver:</b>
<center><b>Check this button if you agree to this waiver <INPUT TYPE="radio" NAME="waiver" value="1">
</b></center>
</td></tr></table>
<br><hr><br>
<input type="Submit" name="submit" value="enter information">
</form>
</td></tr></table>
<?php
} // end if
?>
Am i declaring the session variable FNAME in the correct place? with the proper syntax?
Thanks,
-Michael