NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
$HTTP_POST_FILES


Joined: 14 Feb 2007
Posts: 1
Reply with quote
hello im new to this forum. im don't know where to ask my problem. im actully too much disappointed not getting the answer... please do me a favour.


i want to know how $HTTP_POST_FILES works... i know how to use it and how to work with it. but i have a very small question i have not yet found the answer on the NET i did a search more then 6 hour. but found nothing and finally decided to ask here..
my question goes here....
i know when an ARRAY of $_HTTP_POST_FILES is processed.
it is processed like this...
$HTTP_POST_FILES['file1']['name'];
$HTTP_POST_FILES['file1']['tmp_name'];
$HTTP_POST_FILES['file1']['size'];
$HTTP_POST_FILES['file1']['name'];
$HTTP_POST_FILES['file1']['error'];
i want to know how values are Assigned by the Browser to this Array.

let me explain
when we use this code in our html form
Code:

<form enctype="multipart/form-data" action="uploader1.php" method="post">
 <input type="hidden" name="MAX_FILE_SIZE" value="1024" />
 Send this file: <input name="userfile" type="file" />
 <input type="submit" value="Send File" />
</form>

the browser assign the value
Code:

1024 to the Variable MAX_FILE_SIZE

if we are using get method for any type of processing the values are passed using QueryString.
like
Code:

http://somemywebserver/page.php?lname=Adam&lname=Neal

i know we can not use GET method with $_FILES

now i want to know how the values are assigned to the $_FILES Array by the browser...
View user's profileFind all posts by nikiiSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
probably there is a kind of misunderstanding. Browser has no way to assign anything in php. It sends POST request to the web server, web server passes it to PHP Engine, and latter one parses POST request and puts values into the arrays.
As far as I see <form enctype="multipart/form-data" action="uploader1.php" method="post"> - is a correct form.
You may want to add <input type="hidden" name="DBGSESSID" value="1" /> and it will trigger php debugger and you'll be able to see all the arrays you want to see.
(Certainly, you have to isntall debugger and NuSphere PhpED IDE first).

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
$HTTP_POST_FILES
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic