View Single Post
  #2 (permalink)  
Old 04-23-2008, 05:03 PM
John's Avatar   
John John is offline
Co-Administrator
 
Join Date: Jul 2006
Age: 19
Posts: 2,791
Last Blog:
Passwords
Rep Power: 20
John has much to be proud ofJohn has much to be proud ofJohn has much to be proud ofJohn has much to be proud ofJohn has much to be proud ofJohn has much to be proud ofJohn has much to be proud ofJohn has much to be proud ofJohn has much to be proud of
Send a message via AIM to John
Default Re: Help with image upload script - need to make an if null statement

$_FILES is a global multi-dimensional array defined by php. If you would like to see the contents of the array you can use the print_r() function.
PHP Code:
print_r($_FILES['new_image']); 
To access an element in the array, you need to ask for its exact index. For example
PHP Code:
echo $_FILES['new_image']['name']; 
will echo the name of the file. See here for more information: PHP: Handling file uploads - Manual

I've written a upload class that you can modify if you would like: PHP: Upload Class
__________________
CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum | My Blog
Chat with other CodeCall members on IRC; connect to irc.codecall.net and join #codecall
Reply With Quote