Jump to content

seating reservations


bryanptcs

Recommended Posts

I am trying to come up with a program that list available seating options for the amount of people that they choose...I am not going to get too crazy...I am only giving them the option of a two seater, 4, and six seater.

I have a mysql db setup with a list of tables and the amount each table holds.

I want my user to be able to select from the amount of tickets list (2,4, or 6) and have then have the next list which is calling all the the tables from the db to automatically update with the tables that will hold that amount.

Here is what I have so far....
[code]
<form action="reservetable_action.php" method="POST">
<table border="0">


<tr>
  <td align="right"><b>Corporation</b></td>
  <td><input name="company" type="text" id="company" size="30" maxsize="50" /> </td></tr>
<tr>
  <td width="120" align="right"><b>Amount of Tickets </b></td>
  <td><label>
    <select name="amt_tickets" id="amt_tickets">
      <option value="2">2</option>
      <option value="4">4</option>
      <option value="6">6</option>
        </select>
  </label></td>
</tr>
<tr>
  <td align="right"><strong>Select Table </strong></td>
  <td>
<?php
echo "<label>";
echo "<select name='list_table' id='list_table'>";
while ($row = mysql_fetch_array($result))
{
extract($row);

echo "<option value='".$table_id."'>";
echo $table_id;
echo "</option>";
}
echo "</select>";
echo "</label>";

?></td>
</tr>
<tr>
  <td align="right" valign="top">&nbsp;</td>
  <td valign="top"><p>&nbsp;</p>
    </td>
</tr>
<tr>
  <td align="right"><strong>Comments</strong></td>
  <td rowspan="4" valign="top"><label>
    <textarea name="comments" cols="30" rows="6" id="comments"></textarea>
  </label></td>
  </tr>
<tr>
  <td align="right">&nbsp;</td>
  </tr>
<tr>
  <td align="right">&nbsp;</td>
  </tr>
<tr>
  <td align="right">&nbsp;</td>
  </tr>
<tr><td align="center" colspan="2"><br /><input name="Submit" type="submit" id="Submit" value="Submit" />
</td></tr>
</table>
</form>
[/code]

Right now, this lists all tables regardeless of what was input into the amount of tix list.  Any ideas?  Thanks.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.