| 
 | 
  Greg Milby - 2013-09-20 13:14:11  
can you provide an example that utilizes all the methods please? 
 
Thank you! 
:) 
  
  saadi ali - 2013-09-23 10:53:58 -  In reply to message 1 from Greg Milby 
include("class_images.php"); 
 
 $field = 'field'; 
 $folder = 'upload'; 
 $allowed = array("JPG",'GIF','PNG'); 
 
$upload = new upload($field, $folder, $allowed, false, $folder, 200, 150); 
 
     if($upload->error() == 0){ 
               if($upload->error_ext()){ 
                      echo "error extension"; 
                  } 
         $upload->new_name(); 
         if($upload->up(true)){ 
           echo "Uploaded successfully"; 
         } 
     }else{ 
           echo "field empty"; 
     } 
 
  
  Koptev - 2013-11-15 05:34:55 -  In reply to message 2 from saadi ali 
Hello Saadi! 
I'm beginner in PHP --> define ('$me','noob') 
 
I try to use your class on my website for photos upload. 
Unfortunately I got 'error extension' every time i use it. 
 
My form for file uploading: 
 
<form enctype="multipart/form-data" method="post" action="file-upload.php"> 
<input type="file" name="photo" /> 
<input name="submit" type="submit" value="Upload" /></form> 
 
In file-upload.php I've used your example: 
 
include ("../includes/class_images.php"); 
 
$field = 'field'; 
$folder = '../photo/'; 
$folder_thumb = '../photo/thumb/'; 
$allowed = array("JPG","GIF","PNG","jpg","gif","png","JPEG","jpeg"); 
$upload = new upload($field, $folder, $allowed, false, $folder_thumb, 200, 150); 
 
<snip> 
 
What I did wrong? 
Your help will be much appreciated! 
 
Thanks,  
Oleg 
  
  saadi ali - 2013-11-17 10:49:17 -  In reply to message 3 from Koptev 
Hello  
 
$field = 'photo';  
 
$field is the name of <input type="file" name="photo" /> 
 
//------ 
I apologize for the delay in a reply 
  
  Koptev - 2013-11-19 06:16:23 -  In reply to message 4 from saadi ali 
Thank you very much!!! 
  
   |