Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

PHP 4.2.2 - Not acknowledging "file" inputs - HELP

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

PHP 4.2.2 - Not acknowledging "file" inputs - HELP

Postby Nebulus » Fri Feb 14, 2003 11:45 am

Hello all. I'm having a horrible time with a file upload script. Here are the basics:

I have the form set to:
ENCTYPE="multipart/form-data"
METHOD="post"

And I have inputs set up like this:
input type="file" name="uploadImage"
input type="hidden" name="testField" value="this is a test"
input type=submit

When I use this form, selecting a file to upload, then post to my PHP script, nothing gets uploaded. To make things simple, I just uploaded a test script that calls phpinfo();

The _POST array is displayed, but the only value displayed is:
_POST["testField"] = "this is a test"
and that's it.

Does anybody know what's going on here? I'm under a time crunch, so please help help help! Thank you!
Nebulus
New php-forum User
New php-forum User
 
Posts: 2
Joined: Fri Feb 14, 2003 11:11 am

Postby pootergeist » Sat Feb 15, 2003 5:11 am

check your ini allows file uploading.

also - how are you accessing the file parameters after uploading?

$_POST['uploadImage']['tmp_name']; ?
pootergeist
New php-forum User
New php-forum User
 
Posts: 191
Joined: Wed Jan 29, 2003 7:11 am
Location: UK

Postby Nebulus » Sat Feb 15, 2003 5:25 am

I'm pretty sure file uploads are on. in the phpinfo() results, file_upload is set to 1 for both Master and Local values.

Yes, and I'm trying to reference by $_POST['uploadImage']['tmp_name']; or $uploadImage_name and neither work because not even $_POST['uploadImage'] or $uploadImage have a value - it's empty.

Thanks for the help!
Nebulus
New php-forum User
New php-forum User
 
Posts: 2
Joined: Fri Feb 14, 2003 11:11 am

Postby Redcircle » Sat Feb 15, 2003 8:51 am

it should be $_FILES['uploadImage']['tmp_name'] not $_POST
User avatar
Redcircle
Moderator
Moderator
 
Posts: 830
Joined: Tue Jan 21, 2003 10:42 pm
Location: Michigan USA


Return to PHP coding => General

Who is online

Users browsing this forum: Google [Bot], Yahoo [Bot] and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.