I am using the following code to calculate a user's cost for registering for an event:
$x = 1;
while ($x<=$_SESSION[event_qty]){
if ($_SESSION["qty_event$x"]){
$qty = $_SESSION["qty_event$x"];
$sessid = $_SESSION["event".$x."_id"];
$res = mysql_query("SELECT * FROM events where id='$sessid'");
$ar = mysql_fetch_array($res);
$tmp = "event" . $x . "fee";
$$tmp = $qty * $ar[fee];
$eventfees = $eventfees + $$tmp;
}$x++;}
This works fine, but now comes the problem of storing the user's order in a mysql database table.
Since each user can choose many different combinations of events to attend, and since the total number of available events varies based on the admin input...what is the best way to store the different events and fees in the database for admin to use for accounting and statistical reporting after the user places the order?
Thanks again for all your help!!
Randy