Hello all,
I have a wonderful php app that transfers variables from page to page w/ $_SESSION variables. (it is a checkout form)
It has been working fine for weeks, and I added some code yesterday which seems to have screwed everything up. When the code is on the page, my session variables don't transfer anymore. The code has NOTHING to do with session variables, or so I thought.
The new script is a simple loop that connects to a database to fill the options for a select box. The script is as follows:
Code:
<?php
$conn = mysql_connect("location", "uname", "pword");
mysql_select_db("dbName", $conn);
$sql = "SELECT fldMake FROM tblMakes ORDER BY fldMake";
$result = mysql_query($sql, $conn) or die(mysql_error());
while ($newArray = mysql_fetch_array($result))
{
$mk = $newArray['fldMake'];
print("<option>".$mk."</option>");
}
mysql_close($conn);
?>
The code works fine. But now when the form is submitted I can not fill session variables with $_POST like I had been doing.
Any ideas?
Thanks,
Stan
|