Click to See Complete Forum and Search --> : Website for a online order site


anthonybridgett
11-27-2008, 08:32 PM
I want to create a online ordering website for a resturant. My question here is I create the form to where they can select what they want on their order. After the order is complete have them click a submit button. Is there some simple code to where after they submit the order that it will print at the resturant on a printer. I am think that having a printer on the internet to respond to the request. Can this tie into the submit button finctions. Or what other angles should I be looking into in getting this task done.

Mindzai
11-28-2008, 09:53 AM
I would look into setting up a database into which order details are placed by the customer. This could then be queried by the resteraunt (automatically if necessary using cron) then the output printed via a script. A good place to look might be PHP's printing functions (http://uk2.php.net/manual/en/book.printer.php). There's no way you're going to get this done with just HTML though.

anthonybridgett
11-28-2008, 03:10 PM
So you are saying is make database and have all the customer ordering information dump into the database. And then after the order has taken place write a php script to print the info after the order has been placed. I have never done a databse with HTML. Any suggestions on how I could do this.

Mindzai
11-28-2008, 05:40 PM
HTML doesn't have anything to do with databases, you would probably want to look into MySQL, although if you've never used it before, and as your needs are fairly simple, you could do without it and just use files. You would have an HTML form which passes inputted data to a PHP script which writes a file containing all of the order information in a known format onto the server. You would then have a second script which is run via cron to read the files and print the info. So:

HTML -> PHP Script -> Write File

to take care of the customer side, then a cron job run every 1 or 2 minutes (or whatever) to do the restaurant side:

Cron -> PHP Script -> Read File -> Print

The places to start reading here are the PHP Manual (http://uk3.php.net/manual/en/index.php), especially the filesystem (http://uk3.php.net/manual/en/ref.filesystem.php) section, as well as reading up on cron (http://www.clickmojo.com/code/cron-tutorial.html) if you're not already familiar with it.

techwebonline
12-02-2008, 01:41 AM
Are you using Linux hosting? You will then want to use the Formail script which is usually available in the CPANEL...

anthonybridgett
12-08-2008, 03:55 PM
I have went ahead and looked into getting mysql. After reading on the forums and research I went ahead and got the wamp server all in one. So as long as the web server has mysql installed on it I can use the databases I create in this wamp server. I am a total newbie in php and mysql.

I am going to create a registration form and have that information put into the mysql databases.

I think I can do the same here with the food that the customer orders, with checkboxes.

Getting the info to the resturant after order is placed is where I am having problems. Dont understand this part.

anthonybridgett
12-08-2008, 04:02 PM
Would I have to be writing scirpt to write to a file that is in the mysql database.

Not So Smart
12-13-2008, 05:28 AM
you could try to create a csv file in excel and use that as a database since excel already has table fields in it. or create a database in data access from ms office then import it into mysql

Mindzai
12-19-2008, 06:31 AM
Would I have to be writing scirpt to write to a file that is in the mysql database.

You would just query the database at the restaurant end:

Customer --> Database Server --> Restaurant

Kiefer27
12-20-2008, 03:32 PM
I once made a website like this for a sandwich shop that I worked for. I ran the webserver from the shop, and whenever somebody clicked on the submit button, the webserver would print the order to the default printer (located in the kitchen). I used Tomcat + Struts + MySql, and it took me about 3 months to complete.

Problems you may run into:
1. People not hearing the printer print, and missing the order
2. We used wireless network on the printer, and sometimes the router lost contact, and did not print the order
3. Menu updates can be a drag. I started out using a .sql file that would insert food items/prices, and would update this file, then delete the records from the database, and then re-insert the new records. This worked okay.
4. People trying to order may run into bugs that you may not know about, and your job may go from running a restaurant to running a website.

About a year into my online orderingwebsite, we decided to go with a company. At $50/mo, it made things much easier, and was much more professional looking.
The company we used is GimmeGrub.com, and our website is www.subs-galore.com

I hope this helps.