Trouble with a form for file upload

Joined
Mar 27, 2008
Messages
18
Reaction score
2
Points
3
Hi all,

I'm trying to get a file upload tag to work on my local php/mysql setup.

Here's the code (relevant parts):

<form method="post" action="insert.php" enctype="multipart/form-data">
<input type="text" name="short" size=50>
<input type="file" name="userfile" size=50>
<input type="hidden" name="MAX_FILE_SIZE" value="30000">
</form>

I also bumped the "upload_max_file_size" variable in php.ini 5M

That and everything else I've tried all look right to me, but the form won't pass a value. It passes along the "short" value just fine, but the "userfile" value isn't getting sent to "insert.php" in Firefox.

The Safari browser just dies completely, won't submit the form.

Any ideas?
 
Joined
Apr 23, 2007
Messages
377
Reaction score
4
Points
18
Location
Coatesville, PA
Your Mac's Specs
MBP 15", 2.33 GHz, 2Gb
Try taking the size=50 out of the input field for the type=file, just in case it's trying to read the directory path and it's longer than 50 characters.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top