hey all
i'm busy makin an online bookin system for a project. What i need is when the rooms get displayed, the customer can select, using check boxes which rooms he/she wants. ranging from 1 room to all 6 if he/she wants.
then on the next page i need only the rooms that have been checked to be displayed. finding it a bit difficult and brain is about to crash...
this is some of the code so far:
send.php
<?php
require("dbConnect.php");
if($con)
{
mysql_select_db($database);
$res = mysql_query("select * from room where RoomName not in (select RoomName from booking)");
echo "<form id='form1' name='form1' method='post' action='recive.php'>";
while($row = mysql_fetch_assoc($res))
{
echo "<div id='RoomBorder'>";
echo "<table width='100%'><tr><th colspan='2'>". $row["RoomName"] ."</th></tr>";
echo "<tr><td colspan='2' align='left'>".$row["RoomDescription"]."</td></tr>";
echo "<tr><td><b>Max Guests ".$row["RoomCapacity"]."</b></td><td><b>Rates</b></td></tr>";
echo "<tr><td></td><td>".$row["RoomInSeasonPrice"]."</td></tr>";
echo "<tr><td>Select desired room:<input type='checkbox' name='SelectRoom[]' vaule=".$row["RoomName"]."/></td><td align='Left'>";
echo "<input type='submit' name='Next' id='Next' value='Next' /></td></tr>";
echo "</table><br><br>";
echo "</div><br>";
}
//<!--End of div RoomBorder-->
echo "</form>";
}
?>
then recive.php
<?php
require('dbConnect.php');
if($con)
{
mysql_select_db($database);
$res = mysql_query("Select * from room");
while($row = mysql_fetch_assoc($res))
{
if(isset($_POST['Next']))
{
echo $_POST['SelectRoom'][$i]."<br>";
}
$i++;
}
}
?>
if anyone can help me out i'd be so so so so so so so stoked... just don't know what to do anymore...
thank you pl