Page 1 of 1

mysql retrieving

Posted: Thu Jan 14, 2010 3:24 pm
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

Re: mysql retrieving

Posted: Thu Jan 14, 2010 4:51 pm
by requinix
So what have you done so far?

Re: mysql retrieving

Posted: Thu Jan 14, 2010 4:56 pm
by bben95
Nothing really

Re: mysql retrieving

Posted: Fri Jan 15, 2010 2:57 am
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 :) )

Re: mysql retrieving

Posted: Tue Feb 02, 2010 4:10 pm
by bben95
I don't know how to do that :( thats why i need help.

Re: mysql retrieving

Posted: Wed Feb 03, 2010 4:04 am
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 :)