Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Mar 2007
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Restaurant's reservation system [functions]

    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:

    PHP Code:
    <?php

    $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>
    <tr>
    <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>
    </tr>"
    ;

    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'>";
    ?>

  • #2
    Regular Coder
    Join Date
    Oct 2004
    Location
    England
    Posts
    282
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Completely the wrong forum for this type of thing. This is the showcase where you show off your website work


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •