Concerning drop down menus (new to PHP)

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
James.austin
Forum Newbie
Posts: 2
Joined: Mon Feb 25, 2008 7:50 am

Concerning drop down menus (new to PHP)

Post 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?
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Re: Concerning drop down menus (new to PHP)

Post 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.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
James.austin
Forum Newbie
Posts: 2
Joined: Mon Feb 25, 2008 7:50 am

Re: Concerning drop down menus (new to PHP)

Post 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.
Post Reply