Current location: Hot Scripts Forums » Programming Languages » PHP » Value from $_FILES


Value from $_FILES

Reply
  #1 (permalink)  
Old 05-18-11, 07:22 AM
hemi hemi is offline
Wannabe Coder
 
Join Date: Aug 2009
Posts: 117
Thanks: 15
Thanked 0 Times in 0 Posts
Value from $_FILES

Hi All,


when i do print_r($_FILES) it is giving me

Array ( [Image1] => Array ( [name] => image.jpg [type] => image/jpeg [tmp_name] =>tmp [error] => 0 [size] => 2835 )

How can i extract that image.jpeg to a variable
Reply With Quote
  #2 (permalink)  
Old 05-18-11, 09:15 AM
Nico's Avatar
Nico Nico is offline
Community Leader
 
Join Date: Sep 2005
Location: Spain
Posts: 8,075
Thanks: 11
Thanked 88 Times in 83 Posts
PHP Code:

echo $_FILES['Image1']['name']; 

... ? Either that, or I don't understand the question.

Last edited by Nico; 05-18-11 at 09:19 AM. Reason: Forgot something. ;p
Reply With Quote
  #3 (permalink)  
Old 05-18-11, 09:16 AM
hemi hemi is offline
Wannabe Coder
 
Join Date: Aug 2009
Posts: 117
Thanks: 15
Thanked 0 Times in 0 Posts
Thanks for ur suggestion. But i got it already

What i want is like this

$img1 = $_FILES[Image1][name];
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump


All times are GMT -5. The time now is 08:48 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.