Hey,guys!
I have a form which have some hidden fields because those fields' value need to be displayed in next page by using $_GET.However,I also need to store them into database while form submitted,but my query statement didn't work,what went wrong with it?
<?
$tbl_name = "reserve";
if (isset($_GET['confirm'])){
$insert = mysql_query("INSERT INTO $tbl_name (reserve_date,reserve_time,seat_qty,ref_code)VALUES ('" . $_GET['selected_date'] . "','" . $_GET['showtime'] . "','" . $_GET['noOfSeat'] . ".,'" . $_GET['refCode'] . "')") or die(mysql_error());
}
?>
<tr>
<td><strong>Showtime</strong></td>
<td><?php echo $time; ?></td>
<input type="hidden" name="showtime" value="<?php echo $time; ?>">
</tr>
<tr>
<td><strong>Date</strong></td>
<td><?php echo $_GET['selected_date']; ?></td>
<input type="hidden" name="selected_date"
value="<?php $_GET['selected_date']; ?>">
</tr>
<tr>
<td><font face="Arial"><strong>No. of Seats</strong></font></td>
<td><font face="Arial"><?php echo $noOfSeat; ?></td>
<input type="hidden" name="noOfSeat"
value="<?php echo $noOfSeat; ?>">
</tr>
<tr>
<td>
<input type="hidden" name="refCode" value="<?php echo $refCode; ?>">
</td>
</tr>
RefCode is generated in current page but only displays in next page.