Page 1 of 1

Concerning drop down menus (new to PHP)

Posted: Mon Feb 25, 2008 8:06 am
by James.austin
Hi, I am very new to PHP development, so bare with me. My question is this:

I am currently designing a web page designed to take bookings, and I am not sure if this will be a simple task. Essentially what I need is code which can take down information from drop down menus and cross reference it with existing data in a database (MySQL) of other existing bookings. For example, a hotel and booking a room for a set number of days. Is this a simple task that can be answered? Is more information required? Or is there a place I can be referred to?

Re: Concerning drop down menus (new to PHP)

Posted: Mon Feb 25, 2008 10:16 am
by pickle
This would be simple for me to do - perhaps more complex for someone just starting.

The first step would be to build the webpage with the form that will post the information. I assume you've already got that.
Next, build the page the form posts to. It has to be able to gather the form data by pulling it out of $_POST, $_GET, or $_REQUEST. You can then put that form data in any number of queries & query your MySQL database.

It's not clear what you mean by cross-reference, but once you've got the form data & a connection to the database, you can do pretty much whatever you want with the data.

Re: Concerning drop down menus (new to PHP)

Posted: Mon Feb 25, 2008 12:30 pm
by James.austin
Thanks,

what I meant by cross-referencing was that if for example, someone had booked for the first week of March and then someone else wanted to book the same room for some day during the first week of march, it would prevent them from doing so.

Thanks for the direction, I quite appreciate it.