form submitted file but $_FILES[][] is empty
Posted: Mon Sep 17, 2012 4:35 am
i have a form that posts to a page where i try to echo
"\ntype ".$_FILES["file"]["type"].
"\nsize ".$_FILES["file"]["size"];
and it seems that this array is empty. here is the form:
"\ntype ".$_FILES["file"]["type"].
"\nsize ".$_FILES["file"]["size"];
and it seems that this array is empty. here is the form:
Code: Select all
echo "
<h1>add to ".$mysqlTableName."</h1>
<form action=\"post.php\" method=\"post\">
<label for=\"title\">Title</label>
<input type=\"text\" name=\"title\" />
<br />
<label for=\"text\">Description</label>
<input type=\"text\" name=\"text\" id=\"text\" />
<br />
<label for=\"price\">Price</label>
<input type=\"text\" name=\"price\" id=\"price\" />
<br />
<label for=\"image\">Image</label>
<input type=\"file\" name=\"image\" id=\"image\" />
<br />
<input type=\"submit\" name=\"submit\" id=\"submit\" value=\"Submit\" />
</form>