So i'm fairly new to php, i was hoping maybe some would give me some pointers on what im trying to do ...
Basically its going to be on bus routes and timetables... So i'm going to have two dropdown menus, one for to and the other for from ... based on what they select there the values of the two dropdown menus will match up with two values listed in the database, and as a result generate information about the routes to and from those places selected ...
Any pointers?
Moderator: General Moderators
Okay, ill try to explain a little better ...
You have to drop down menus, from and to
FROM
Sydney <---
Melbourne
Adelaide
Perth
Brisbane
TO
Sydney
Melbourne <---
Adelaide
Perth
Brisbane
<--- show the selection, now it is to query the database, and find routes with both Melbourne and Sydney in them... from the information in the database on these routes, it will generate on page ...
ROUTE NO DESCRIPTION etc
101 Sydney to Melbourne
Is that any better?
You have to drop down menus, from and to
FROM
Sydney <---
Melbourne
Adelaide
Perth
Brisbane
TO
Sydney
Melbourne <---
Adelaide
Perth
Brisbane
<--- show the selection, now it is to query the database, and find routes with both Melbourne and Sydney in them... from the information in the database on these routes, it will generate on page ...
ROUTE NO DESCRIPTION etc
101 Sydney to Melbourne
Is that any better?
Yes, that is much better, thank you.
What you will want to do is create your data base with the info well organized, then create a page with your dropdown menus. that will point to the page you're going to have display the results. You'll want to create another page with your results to display.
On your results page, you'll want to have a few functions that show only the data of what was posted to you.
Depending on how much php you know, this is a fairly easy task. if you're not sure how to post data to another page or how to search conditions in a database, check the tutorial, you'll find it's an easy task.
What you will want to do is create your data base with the info well organized, then create a page with your dropdown menus. that will point to the page you're going to have display the results. You'll want to create another page with your results to display.
On your results page, you'll want to have a few functions that show only the data of what was posted to you.
Depending on how much php you know, this is a fairly easy task. if you're not sure how to post data to another page or how to search conditions in a database, check the tutorial, you'll find it's an easy task.