Happy Friday. I am writing a online job questionairre in php. I want to populate a drop down list on an html form to be from a mysql file. For example-the question I am asking on the questionairre is - What position are you applying for? I want to have the person see a drop down list of job areas such as food service, maintenance ... I will have the h/r person populate this mysql file as their need changes so i do not want to hard code the positions in a drop down in a form. Can someone please give me some guidance as to how this is done? Thanks, Angela
<select name="x" size="1">
<?php $result = mysql_query('SELECT field FROM table'); $i=0; while( $row=mysql_fetch_row($result) ){ echo '<option value="'.$i.'">'.$row[0].'</option>' $i++; } ?>
</select>
Is that what you were looking for?
greetz, Z