gilbertsavier

gilbertsavier

Joined
Jun 30, 2009

Activity Stream

gilbertsavier commented on a Page, My first PHP  -  Jun 30, 2009

Hi,

I need a code that lets my customers upload a image file from their computer and then that file does 2 things

  1. gets uploaded to upload folder on my server
  2. a copy of that file gets e-mailed to me

this is what I have so far, any improvements/additions on this code would really be appreciated...

1.//GET IMAGE INFO
2.

  1. $dir = 'images/';
  2. $file_name = $_FILES['file']['name'];
  3. $file_tmp = $_FILES['file']['tmp_name'];
  4. //CHECK FOR UPLOADED FILE
  5. if(is_uploaded_file($file_tmp)){
  6. //MOVE TO DIR
  7. move_uploaded_file($file_tmp, $dir.$file_name);
  8. }

Thanks & regards,
Lokananth

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.