hello. I have a little problem adding to my database. i've cut my code short, but this is basically where im stuck. I'm currently populating a listbox with categorys from the `category` table. when i select the category i would like it to add to database with the value. I thought the following code would do the trick, but something has gone a bitty wrong somewhere.
the listbox contains the correct values, but when submit is pressed its not adding nothing to the database. where would i be going wrong?
should it be set as $_GET['category']; or $_POST['category'];?
thanks mofish
the listbox contains the correct values, but when submit is pressed its not adding nothing to the database. where would i be going wrong?
should it be set as $_GET['category']; or $_POST['category'];?
thanks mofish

Code:
<?
$selectedcategory = $_GET['category'];
$query = "insert into `gallery` (`image`, `author`, `category`) values ('$filename', '$member', '$selectedcategory')";
?>
<form action="index.php?page=upload" method="POST" enctype="multipart/form-data">
<?
$result = mysql_query("SELECT * FROM `category`");
$category = $myrow["category"];
echo '<select name="selectedcategory">';
while ($myrow = mysql_fetch_array($result)) {
$opt = $myrow['category'];
echo "<option>$opt</option> ";
}
echo '</select>';
?>
<input type="hidden" name="MAX_FILE_SIZE" value="10485760" class="loginbox">
<input type="file" name="imagefile" class="loginbox">
<input type="submit" name="upload" value="Upload Image" class="loginbox"></p>
</form>
<?