View Full Version : call from databse

08-31-2006, 12:23 PM
i have some data for example :

data_name value
place USA
place UK
place RUSIA
place CHINA
place JAPAN

so how i can call from database this data into select, radio and check box.

for example: place: <select name=place>
<option value=USA>USA</option>
<option value=USA>USA</option>
<option value=USA>USA</option>

and more ....

08-31-2006, 01:15 PM
well you need to query your db, and then loop in your results and create the options for the select ?
think that there is no other way, so you have to do it. No magic here :)

08-31-2006, 02:02 PM
Please do not post the same questions in multiple forums. The one in mysql has been deleted so all your answers will end up in one thread.

08-31-2006, 02:16 PM
# to display data in select box

$data = $dblink->getTableFromDB("select * from oes_courses");

<select name="student_course" class="selectbox">
$i = 0;
<option><? echo $data[$i]['courseName']; ?></option>