Hello! I´ve searched the web (as well as existing threads) for an answer :-)
Now I turn to you and I hope someone has a minute, since it is most likely a rather simple case to solve.
Mission: To post input from a dropdown list to the database. If I use a plain textfield it works just fine.
It looks like this with the textfield which works:
<?php
if ($submit) {
// process form
$db = mysql_connect("localhost", "jarba", "xxx");
mysql_select_db("myDB",$db);
$sql = "INSERT INTO UniqueDocNbr (Country,Location,Year,Department,Description,UniqueNumber,Textfield,Owner,Filelocation) VALUES ('$Country', '$Location', '$Year', '$Department', '$Description', '$UniqueNumber', '$Textfield', '$Owner', '$Filelocation')";
$result = mysql_query($sql);
echo "Thank you! Information has been entered.\n";
} else{
// display form
?>
<form method="post" action="<?php echo $PHP_SELF?>">
Filelocation:<input type="Text" name="Filelocation">
What is missing below??? and how is the right option chosen? I have tried a few options without success so far!!
Year:
<select name="dropdown">
<option value="1">02</option>
<option value="2">03</option>
<option value="2">04</option>
<option value="2">05</option>
</select>
<input type="Submit" name="submit" value="Enter information">
</form>
I hope I succeded in describing the problem! Thanks in advance
/ Åsa