Jump to content

Question about $_FILES['']


dreamwest

Recommended Posts

I just did an ajax image upload script and found it strange how $_FILES was treated.

 

Form

<form action="/red_upload.php" method="post" enctype="multipart/form-data">
Nickname: <input type="text" name="nick" value='' />  
<input type="file" name="file" />
<input type="submit" name="submit" />
</form></nobr>

 

upload.php

echo $_FILES['nick'];

// heaps of code here....

echo "Thankyou {$nick} your upload is completed";

 

which outputs the value of the nickname...but ive already echoed the files value at the top of the script but its showing up at the bottom $nick variable

 

"Thankyou Potter your upload is completed"

 

Why is this??

Link to comment
https://forums.phpfreaks.com/topic/179868-question-about-_files/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.