How can i display a columns values from my database in a drop down menu as selections? So far I have the forms code down I think now I'm trying to figure out the actual database code side of this. Any help is greatly appreciated. Thanks in advance.
This may help:
http://oi61.tinypic.com/258tmhd.jpg
CODE
<html>
<header>
</header>
<body>
<form action="/demoform/contact_form.php" id="formA" method="post" name="formA">
<big>LOAD PAST ORDERS:</big>
<select id="drop_down" name="drop_down">
<?php foreach($array_results as $row) : ?>
<option value="<?php echo $row['key'];?>" ><?php echo $row['itemname'];</option>
<?php endforeach; ?>
</select>
<input type="text" id="email" name="email"/>
<input id="email" name="email" type="text" value="demo@gmail.com" readonly="readonly"/>
<input id="itemname" name="itemname" type="text" />
<button type="submit" value="Submit">Submit</button>
</form>
</body>
</html>