Trouble with list building from database

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
CtownCreep
Forum Newbie
Posts: 1
Joined: Fri Jan 08, 2010 9:40 am

Trouble with list building from database

Post by CtownCreep »

I guess I'll start with the goal. I need to build an ordered list based on items selected in a dropdown menu and I need to combine those items' corresponding addresses together to build a link to google maps.
In my database, I have a table with columns for id, name, and address. Based on which option from the dropdown is selected, the submit button should create an <li> element with the name of the place in it, and it should be putting that place's address somewhere so that the next time the submit button is clicked, the next address can be added to it.

I guess I'm stuck wondering how to have a variable that doesn't initialize back to zero when the submit button is clicked so I can concatenate them.


I'm very new to this and I'm not sure if this is the most efficient way to do it.
If anybody has any suggestions as for how this should be done (pseudocode, perhaps?), it would be greatly appreciated.
User avatar
manohoo
Forum Contributor
Posts: 201
Joined: Wed Dec 23, 2009 12:28 pm

Re: Trouble with list building from database

Post by manohoo »

It would be easier for us if you post the code.
Post Reply