I want to get this image uploading script right, but for whatever reason it doesn't like the description input. It was working perfectly before I added the description input and I can't think of what might be wrong because it looks fine. My code doesn't like the description input in the form, what is wrong? Thanks for the help!
HTML Form
<h1>Image Gallery</h1>
<form enctype="multipart/form-data" action="upload.php" method="POST">
Please choose a file: <input name="uploaded" type="file" /><br />
Description: <textarea maxlength="255" name="description" id="description"></textarea><br />
<input type="submit" value="Upload" />
</form>
PHP Code (There is code before this but it doesn't matter)
$userid = mysql_real_escape_string($_SESSION['UserID']);
$imageid = mysql_real_escape_string($i);
$image = mysql_real_escape_string($rename);
$description = mysql_real_escape_string($_POST['description']);
$registerquery = mysql_query("INSERT INTO imageupload (UserID, ImageID, Image, Description) VALUES('".$userid."', '".$imageid."', '".$image."', '".$description."')");
if($registerquery) {
header( 'Location: manage.php' ) ;
}
else {
echo "<h1>Error</h1>";
echo "<p>Sorry, an error occured. Please go back and try again.</p>";
}