Forums
This topic is locked
Problem getting file varablies to pass from a form
Posted 12 Jun 2006 00:50:00
1
has voted
12 Jun 2006 00:50:00 Chris Strauss posted:
Here is the code in question (for Now)<pre id=code><font face=courier size=2 id=code>
$image = $HTTP_POST_FILES['product_image']['name'];
$temp = $HTTP_POST_FILES['product_image']['tmp_name'];
$size = $HTTP_POST_FILES['product_image']['size'];
$type = $HTTP_POST_FILES['product_image']['type'];
</font id=code></pre id=code>
basicly Im using the file type from html form elements to upload a image, and store the path to that image in a database. I have done this many times before with basicly the same code but for somereason the only one that is being past is the $image variable. all the other are showing empty. tmp_name should give the temp name the server gives it and size should give the file size as well as type should give me the mime type but all 3 of those are comming up blank, when its passed on from the form.
Now I have installed wamp since I last used this bit of code perhaps something with global varables or along that line with wamps configuration. But if anyone has an Idea as to how to get the other three values to pass through please let me know. Im seriously puzzled as to why i got it to work many times before and now it wont.
thanks
Replies
Replied 13 Jun 2006 10:26:58
13 Jun 2006 10:26:58 Roddy Dairion replied:
use $_FILES instead of http_post_files.
Edited by - roders22 on 13 Jun 2006 10:27:18
Edited by - roders22 on 13 Jun 2006 10:27:18