View Full Version : Restaurant's reservation system [functions]

03-12-2007, 06:33 PM
Heelloo...I'm currently doing the restaurant's reservation system. I wanna do this function. The function i needed is when the date arrival of guest is more than the actual server time, a label called "reservation cancelled" will be show to inform to the user that the reservation is cancelled by looking at the label.

Maybe..I am not good in explaning. I will give u d example: a customer key in the time arrival as 12.30pm and date as 1/3/2007 for his reservation, but when the customer do not show up within 30mins after the arrival time (means 1pm), the label called "reservation cancelled" will be shown to tell the staff that the reservation is cancelled! If there are functions that can auto delete the records that over the arrival time, it is good!! And can anyone help me to create the fucntion of for deleting the records using the checkbox! Can anyone help me to improve it? Thanks! The following is the code i done:


$result = mysql_query("SELECT * FROM reservation WHERE username = '" . $_SESSION['user_logged'] . "' ");

echo "<b><center><table border='0' border='black' padding='20' cellspacing='10' bgcolor='#FFCCCC'></font></b></center>
<th align='left'> </th>
<th align='left'>Reservation No.</th>
<th align='left'>Date</th>
<th align='left'>Time</th>
<th align='left'>Number Of Guests</th>

while($row = mysql_fetch_array($result))
echo "<tr>";
echo "<td>" . "<INPUT TYPE='checkbox' NAME='to_del[]' VALUE=1 checked>";
echo "<td>" . "<left>" . $row['reservationID'] . "</td>";
echo "<td>" . "<left>" . $row['date'] . "</td>";
echo "<td>" . "<left>". $row['time'] . "</td>";
echo "<td>" . "<center>" . $row['numberOfGuest'] . "</td>";
echo "<td>" . "<font color='red'><label for='male'> RESERVATION CANCELLED</label></font>";
echo "</tr>";

echo "</table>";
echo "<br><INPUT TYPE='submit' NAME='submit' VALUE='Delete'>";

03-13-2007, 11:44 AM
Completely the wrong forum for this type of thing. This is the showcase where you show off your website work ;)

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum