hi, i have the following form which should (and does) submit and INSERT into a mysql database table. the bit that doesnt work is populating the pick list. the query result DOES echo once, so that the viewer can have an overview of all items, and it appears to populate that select picklist, but the list does not expand, and the items are not visible. you can see it at www.schmidauermollbarth.at/cms/admin.php. im sure ive done something stupid here, could anyone steer me in the right direction?
<?php require_once("includes/connection.php"); ?>
<?php require_once("includes/functions.php"); ?>
<?php include("includes/header.php"); ?>
<?php
if(isset($POST['submit']))
{
$new_termin = $POST['create_termin'];
//$new_termin was set equal to the posted variable, then smbTermine is the table
$query = "INSERT INTO smbTermine (termin) VALUES ('{$new_termin}')";
$result = mysql_query($query, $connection);
}
?>
<table height="295" id="structure">
<tr>
<td id="navigation">
<h2>Admin Menu</h2>
<p>Welcome to the Admin area.</p>
<ul>
<li><a href="new_termin.php">New Termin</a></li>
<li><a href="future_termin.php">Future Termin</a></li>
<li><a href="old_termin.php">Old Termin</a></li>
</ul> </td>
<td id="page">
<h2>Termine Verwalten</h2>
<h3>Current Performances are:</h3>
<?php
$result = mysql_query("SELECT * FROM smbTermine", $connection);
if(!$result)
{
die("Database query failed: " . mysql_error());
}
while($row = mysql_fetch_array($result))
{
echo "<li>{$row["termin"]}</li>";
}
?>
<form action="new_termin.php" method="post">
<p>
<input type="text" name="create_termin" value="" id="create_termin" width="300px"/>
<input type="submit" name="submit" value="Add Termin" />
</p>
</form>
<form action="new_termin.php" method="post">
<select name="termin" id="termin" >
<p>
<?php
$result = mysql_query("SELECT * FROM smbTermine", $connection);
if(!$result)
{
die("Database query failed: " . mysql_error());
}
while($row = mysql_fetch_array($result))
{ ?>
<option value="<?php
echo $row["termin"]; ?>"></option>
<?php } ?>
</p>
</form>
</td>
</tr>
</table>
<?php require("includes/footer.php"); ?>