why doesn't the selected item from the select box get inserted into teh table?
<!-- newarticle.php -->
<HEAD>
<TITLE> Add New article </title><meta http-equiv="expires" content="0">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache"> </head>
<BODY>
<?php
include("articles.inc");
mysql_select_db("petesmc_articles");
if ($submit): // A new article has been entered
// using the form below.
$sql = "INSERT INTO articles SET " .
"AuthorID='$aauthorid', " .
"CatID='$ccatid', " .
"SubID='$ssubid', " .
"DateAdded='CURDATE()', " .
"Description='$description', " .
"Title='$title', " .
"Status='$status', " .
"Text='$text'";
if (mysql_query($sql)) {
echo("<P>New article added</P>");
} else {
echo("<P>Error adding new article: " .
mysql_error() . "</P>");
}
?>
<P><A HREF="<?php echo($PHP_SELF); ?>">Add another article</A></P>
<P><A HREF="articles.php">Return to article list</A></P>
<?php
else: // Allow the user to enter a new article
$result = mysql_query("SELECT authors.ID, authors.Name FROM authors");
$result2 = mysql_query("SELECT category.ID, category.Cat FROM category");
$result3 = mysql_query("SELECT subcategory.ID, subcategory.SubCat FROM subcategory");
?>
<FORM ACTION="<?php echo($PHP_SELF); ?>" METHOD=GET>
</tr></table><br><br>
<P><font size="6" color="#0066FF">Enter the new Article:</font><BR>
</P>
<blockquote><table width="536" border="1" cellspacing="0" cellpadding="5" align="left">
<tr>
<td width="71"><b>AuthorID:</b></td>
<td width="151"> <b>
<select name="authorid" size="1">
<?
while ($resulta = mysql_fetch_array($result)) {
$listauthorid = $resulta[authors.ID];
$listname = $resulta["Name"];
echo("<option value=$listauthorid>$listname</option>");
} ?></select>
</b></td>
<td width="114"><b>SubcategoryID: </b></td>
<td width="150"> <b>
<select name=subid>
<?
while ($result3a = mysql_fetch_array($result3)) {
$listsubid = $result3a[subcategory.ID];
$listsubcat = $result3a["SubCat"];
echo("<option value=$listsubid>$listsubcat</option>");
} ?></select>
</b></td>
</tr>
<tr>
<td width="71"><b>Title: </b></td>
<td width="151"> <b>
<input type=TEXT name="title" size=25 maxlength=100>
</b></td>
<td width="114"><b>Category:</b></td>
<td width="150"> <b>
<select name=catid>
<?
while ($result2a = mysql_fetch_array($result2)) {
$listcatid = $result2a[category.ID];
$listcat = $result2a["Cat"];
echo("<option value=$listcatid>$listcat</option>");
} ?></select>
</b></td>
</tr>
<tr>
<td width="71"><b>Status:</b></td>
<td width="151"> <b>
<select name="status">
<option>Select Status type .....</option>
<option value="active">Active</option>
<option value="featured">Featured</option>
<option value="hidden">Hidden</option>
</select>
</b></td>
<td colspan="2"><b></b><b></b></td>
</tr>
<tr>
<td colspan="4" height="26"><b> Description: </b></td>
</tr>
<tr>
<td colspan="4"> <b>
<textarea name="description" rows=6 cols=60 WRAP></textarea>
</b></td>
</tr>
<tr>
<td colspan="4"><b>Article Text:</b></td>
</tr>
<tr>
<td colspan="4"> <b>
<textarea name="text" rows=25 cols=100 WRAP></textarea>
</b></td>
</tr>
<tr>
<td colspan="4">
<input type=SUBMIT name="submit" value="SUBMIT ARTICLE">
<input type="reset" name="Reset" value="RESET">
</td>
</tr>
</table></blockquote>
<P> <BR>
</P>
</FORM>
<?php endif; ?>
</BODY>