I tried lot of way to pass the checkbox values from page 1 to page 2. But I only get successes on fruit id, how can pass the fruit charges.
// how can I pass room charges"$result[room_charges]" to page 2
// page 1
$sql=mysql_query("select * from fruit");
while ($result = mysql_fetch_assoc($sql)) {
echo "<label> <input type=checkbox name=fruit[] value=$result[fruit_id] id=Test_0 > $result[fruit_name] | $$result[fruit_charges] </label> ";
echo "<br>";
//page 2
// how to replace from page 1 $result[fruit_charges] the charges to f_pay
// like room_id works
$room=$_POST['room'];
foreach ($fruit as $fruitname)
{
$sql="INSERT INTO reserve (f_aid, f_name, f_pay) VALUES
('$fid', '$fruitname', '10')";
if (!mysql_query($sql,$conn))
{
die('Error: ' . mysql_error());
}
}