|
Posted by haggis on 03/13/06 21:45
On Mon, 13 Mar 2006 18:10:18 GMT, "Simon" <simon@webworx.co.uk>
wrote:
>>><haggis@_your_teeth_nerdshack.com> wrote in message
>>>news:i3o712lf9h5ibm6e50i8tb8of3hm75n7j1@4ax.com...
>>>> Our restaurant is developing a Delivery service and I'm wondering
>>>> how to handle the choices the customers will make on-line.
>>>> Stripped of the cosmetics, this is the display of the whole menu
>>>> (which is compiled from the output of several different menus -
>>>> "Starters", "Main Courses", "Salads", etc).
>>>>
>>>> The restaurant is developing a Delivery service and I'm wondering
>>>> how to handle the choices the on-line customers will make.
>>>> This bare-bones display of the choices works fine -
>>>>
>>>> $TableName="menus";
>>>> $Query="SELECT * FROM $TableName order by menu_id";
>>>> $Result=mysql_db_query ($DBName, $Query, $Link);
>>>> while ($Row=mysql_fetch_array ($Result))
>>>> {
>>>> $list_of_menus[]=$Row[menu_name];
>>>> }
>>>> $count=count($list_of_menus);
>>>> $count=$count-1;
>>>> $n="0";
>>>> while ($n<=$count)
>>>> {
>>>> print("<form method=post action=take_away_handle.php>");
>>>> print("<table>");
>>>> $TableName=$list_of_menus[$n];
>>>> $Query="SELECT * FROM $TableName order by dish_id";
>>>> $Result=mysql_db_query ($DBName, $Query, $Link);
>>>> while ($Row=mysql_fetch_array ($Result))
>>>> {
>>>> print("<tr><td>$Row[dish]</td><td>$Row[cost] <input
>>>> TYPE=\"checkbox\" NAME=\"$list_of_menus[$]\" VALUE=\"$Row[dish]\">
>>>> </td><td><input type=text name=\"number\" size=2></td></tr>");
>>>> }
>>>> $++;
>>>> }
>>>>
>>>>
>>>>
>>>> All that works just fine, unrolling the 80-odd dishes in our menu
>>>> down the screen, but... how do I handle the output? I'm guessing
>>>> it would be best to write each set of customer choices to a file,
>>>> its filename being composed of the customer surname, but how do I
>>>> handle the blank items? Are they, indeed, passed by the form?
>>>>
>>>> (Guess who's never used check-boxes before? Go on, guess - you'll
>>>> never guess...)
>>>>
>>>> TIA.
>>>>
>>>> All that works just fine, unrolling the 80-odd dishes in our menu
>>>> down the screen, but... how do I handle the output? I'm guessing
>>>> it would be best to write each set of customer choices to a file,
>>>> with the filename being the customer name, but how do I handle the
>>>> blank items? Are they, indeed, passed by the form?
>>>> And how do I handle multiple items (several people ordering
>>>> different dishes from the "Main Courses", for instance)?
>>>>
>>>> (Guess who's never used check-boxes before? Go on, guess - you'll
>>>> never guess...)
>>>>
>>>> TIA.
>>>> Remove _your_teeth_ to reply.
>>>
>>>Why not use an in memory table and with each choice placed in the table and
>>>referenced via a session_id/user_id.
Sorry, I'm not very good at this - I don't understand what you
mean.
>>>
>>>What do you mean by blanks?
>>>simon
The input fields which are not used becos the visitor has chosen
something else from that menu.
Remove _your_teeth_ to reply.
Navigation:
[Reply to this message]
|