insert2.html
- Code: Select all
<form action="insert2.php" method="post" enctype="multipart/form-data" name="insert">
<input type="hidden" name="MAX_FILE_SIZE" value="3000000" />
<b>Title:</b><br />
<input name="title" type="text" size="50" /><br />
<b>Author:</b><br />
<input name="author" type="text" size="50" /><br />
<b>Date of Creation:</b><br />
<input name="date" type="text" size="20" /><br />
<b>Summary:</b><br />
<textarea name="summary" cols="50" rows="10" /></textarea><br />
<b>Department:</b><br />
<input name="dept" type="text" size="20" /><br />
<b>Media Type:</b><br />
<select name="mediatype">
<option value="video">Video</option>
<option value="image">Image</option>
<option value="audio">Sound clip</option>
</select><br />
<b>Video:</b><br />
<input name="video" id="video" type="file" /><br />
<b>Thumbnail:</b><br />
<input name="thumb" id="thumb" type="file" /><br />
<input name="submit" type="submit" value="Submit" />
<input name="reset" type="reset" value="Reset" />
</form>
insert2.php
- Code: Select all
$title = $HTTP_POST_VARS['title'];
$author = trim($HTTP_POST_VARS['author']);
$date = trim($HTTP_POST_VARS['date']);
$summary = trim($HTTP_POST_VARS['summary']);
$dept = trim ($HTTP_POST_VARS['dept']);
$mediatype = trim($HTTP_POST_VARS['mediatype']);
$TRUE = 1;
$FALSE = 0;
echo "Title: $title <br>";
echo "Author: $author <br>";
echo "Date: $date <br>";
echo "Summary: $summary <br>";
echo "Department: $dept <br>";
echo "Media type: $mediatype <br>";
I only put in the very beginning of the code for insert2.php because that is where the problem is happening. This doesn't print out anything from the variables. I am also having issues with the $_FILES array not getting anything. If anybody has any ideas I would really appreciate it.
Thank you!!!