bryanptcs Posted January 12, 2007 Share Posted January 12, 2007 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"> </td> <td valign="top"><p> </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"> </td> </tr> <tr> <td align="right"> </td> </tr> <tr> <td align="right"> </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. Quote Link to comment Share on other sites More sharing options...
Jessica Posted January 12, 2007 Share Posted January 12, 2007 SQL? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.