All forms acting like multipart/form-data

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
ruthsimon
Forum Newbie
Posts: 19
Joined: Mon Aug 19, 2002 5:44 pm

All forms acting like multipart/form-data

Post by ruthsimon »

I added a form to my site with enctype="multipart/form-data" in order to use the php copy function to upload files. That works fine.

Here's the weird part. Now all my files are acting like they're uploading objects. Even if I do a super simple 'post' form with no explicit enctype, and I reveal the post variables on the results page with 'foreach ($_POST as $key -> $value), I get:

$key:Object -> $value:

when I'm expecting:

$key: name -> $value: charlie

What happened?

Ruth
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

What do you get if you do:

Code: Select all

echo '<pre>';
print_r($_POST);
echo '</pre>';
Mac
Post Reply