Link to home
Start Free TrialLog in
Avatar of jwnrb
jwnrb

asked on

Populating Select Box from mySQL

Hi,

How do i populate a select dropdown box in a php page.  Ilike to use the following sql statement: "select distinct country from teldir" so the drop down list will display countries only found in the teldir.

thanks so much
ASKER CERTIFIED SOLUTION
Avatar of a.marsh
a.marsh

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jwnrb
jwnrb

ASKER

what is meant by a pointer with dbconnection?
Basically establish a connection to the database:


$dbConnection = mysql_connect("localhost", "db_user_name", "db_password");
mysql_select_db("database_name");



Replace the values accordingly.

:o)

Ant
Avatar of jwnrb

ASKER

Thank you very much!  That was so simple.  I have dont it before in asp, but now i am doing a project in php. (first major one)

when you said pointer i got confused with char *ptr;

(i am also doing c++)

i was like there arent pointers in php, are there?  i am learning php as i do projects so i havent had the opportuninty to learn the language yet!

thanks again!
My pleasure. :o)

Ant