mysql retrieving

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
bben95
Forum Newbie
Posts: 3
Joined: Thu Jan 14, 2010 2:57 pm

mysql retrieving

Post by bben95 »

Hi, I'm new to php and I want to write a script that can look in a mysql database and search for different criteria depending on the input from an HTML form. for example, I would have a HTML page that asks the user (via a HTML form) different questions, and then submits (or posts) the info to a php file which looks in the mysql database. The mysql database would contain different ski resorts (because that is what the website will be about) and the php file will show resorts that are good for skiing with a family for a complete beginner (or whatever else the user selects). The resorts in the mysql database may also turn up for more than one search. eg. a resort named "test" may turn up if the user selects the options shown in the picture below, or if the select the same options in the picture except the level, which could be 2 also. Then I want the php file to show a list of resorts from the mysql file suitable for the user that submitted the form.

The html form would look something like this:
Image

Any help would be greatly appreciated
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: mysql retrieving

Post by requinix »

So what have you done so far?
bben95
Forum Newbie
Posts: 3
Joined: Thu Jan 14, 2010 2:57 pm

Re: mysql retrieving

Post by bben95 »

Nothing really
aravona
Forum Contributor
Posts: 347
Joined: Sat Jun 13, 2009 3:59 pm
Location: England

Re: mysql retrieving

Post by aravona »

Ok so best place to start is with your MySQL database. Set that up with your data - then once you've created your form and had a go at using Select Statements to search your database for the correct data we'll be able to help you out a bit more (rather than just writing it for you :) )
bben95
Forum Newbie
Posts: 3
Joined: Thu Jan 14, 2010 2:57 pm

Re: mysql retrieving

Post by bben95 »

I don't know how to do that :( thats why i need help.
aravona
Forum Contributor
Posts: 347
Joined: Sat Jun 13, 2009 3:59 pm
Location: England

Re: mysql retrieving

Post by aravona »

Then I suggest having a look here: SQL and here PHP and have a go :) then if you come to any problems post again :)
Post Reply