mysql
techgeek asked:


I been struggling with this all morning.
I am tiring to create a dynamic form field that uses data from a myself database but cannot seem to get it to work.
Anyone know how to code a simple php code for a single dropdown field form that pulls data from a table field on a mysql database.

Comments

robert_of_anaheim on 8 April, 2008 at 5:47 pm #

Contact me and I will send you some sample code


Peter K on 11 April, 2008 at 9:54 pm #

You have a normal drop down option box, and for each line to insert the fields returned from your query.

When you say dynamic, you won’t be able to do more fetches after the page has loaded. You only get one chance to do the PHP.


xArz on 12 April, 2008 at 1:38 am #

Here’s my code:

So what Im doing in my code is first connect to the database and select which database im going to use. And then on the second part of the php im retrieving the ‘name’ field from ‘Country’ table and print it.


Post a Comment
Name:
Email:
Website:
Comments: