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
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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
$dbConnection = mysql_connect("localhost",
mysql_select_db("database_
Replace the values accordingly.
:o)
Ant
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!
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
Ant
ASKER