I have obtained the following code for producing a drop down list, which works perfect for me.
<?php
$result = mysql_query("SELECT drop_down FROM database",$db);
echo "<select name=drop_down>\n";
while ($row = mysql_fetch_array($result)) {
echo "<option value=$row[0]>$row[0]</option>\n";
}
echo "</select>\n";
?>
First of all, what I would like to do is to locate this drop down box in a particular location.
At the moment I am using the following to locate text boxes on the page
<div id="Layer1" style="position:absolute; left:10px; top:125px; width:100px; height:37px; z-index:1">
First name:<input type="Text" name="first"><br><br>
</div>
Second of all, how do I incorporate this dropdown box into my form, such that when I hit the submit button it will send the selected option to the database.
Please Note :I already have a form that will send data to a database
Thanking in advance for any help received
<?php
$result = mysql_query("SELECT drop_down FROM database",$db);
echo "<select name=drop_down>\n";
while ($row = mysql_fetch_array($result)) {
echo "<option value=$row[0]>$row[0]</option>\n";
}
echo "</select>\n";
?>
First of all, what I would like to do is to locate this drop down box in a particular location.
At the moment I am using the following to locate text boxes on the page
<div id="Layer1" style="position:absolute; left:10px; top:125px; width:100px; height:37px; z-index:1">
First name:<input type="Text" name="first"><br><br>
</div>
Second of all, how do I incorporate this dropdown box into my form, such that when I hit the submit button it will send the selected option to the database.
Please Note :I already have a form that will send data to a database
Thanking in advance for any help received