Any pointers?

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
bconnor
Forum Newbie
Posts: 4
Joined: Tue Oct 31, 2006 12:07 am

Any pointers?

Post by bconnor »

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 ...
ohlaph
Forum Newbie
Posts: 7
Joined: Mon Oct 30, 2006 11:42 pm

Post by ohlaph »

Could you explain this more, it doesn't really make sense...
bconnor
Forum Newbie
Posts: 4
Joined: Tue Oct 31, 2006 12:07 am

Post by bconnor »

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?
ohlaph
Forum Newbie
Posts: 7
Joined: Mon Oct 30, 2006 11:42 pm

Post by ohlaph »

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.
bconnor
Forum Newbie
Posts: 4
Joined: Tue Oct 31, 2006 12:07 am

Post by bconnor »

With regards to displaying the results, it is possible to generate them on the same page as the form, or do you have to create a new page?
Post Reply