Where do you get stuck? The principle is: construct appropriate query to retrieve rows from the table and then use data of each row to build option elements:
// query
$q = 'SELECT id, title FROM movies';
// connection and querrying stuff
...
// start the html code for select element (drop down)
echo '<select name="movies">';
// add options from the database (mysql used here)
while($row = fetch_assoc($mysql_result)) {
echo '<option value="' . $row['id'] . '">' . $row['title'] . '</option>';
}
// end the html code for select element
echo '</select>';
Post the code you have so far.
broj1
Nearly a Posting Virtuoso
1,212 posts since Jan 2011
Reputation Points: 167
Solved Threads: 164
Skill Endorsements: 13
pritaeas
Posting Prodigy
9,315 posts since Jul 2006
Reputation Points: 1,178
Solved Threads: 1,466
Skill Endorsements: 86