Re: Single File Uploads and Save into DB

  •  11-21-2012, 10:27 AM

    Re: Single File Uploads and Save into DB

    Hi Jacques123,

     

    Please create a new page with the code below, then send me the url of this page. I will check it and get back to you as soon as possible.

     

    1. <?php require_once "phpuploader/include_phpuploader.php" ?> 
    2. <?php session_start(); ?> 
    3. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
    4. <html xmlns="http://www.w3.org/1999/xhtml"
    5.   <head> 
    6.     <title> 
    7.       example 
    8.     </title> 
    9.   </head> 
    10.   <body> 
    11.  
    12.     <form id="form1" method="POST"
    13.       <?php               
    14.                     $uploader=new PhpUploader(); 
    15.                     $uploader->MaxSizeKB=10240; 
    16.                     $uploader->Name="myuploader"
    17.  
    18.                     $uploader->Render(); 
    19.             ?> 
    20.  
    21.     </form> 
    22.  
    23.  
    24.     <?php 
    25. $fileguidlist=@$_POST["myuploader"]; 
    26. if($fileguidlist
    27. $guidlist=explode("/",$fileguidlist);    
    28.     foreach($guidlist as $fileguid)     
    29.     {     
    30.          
    31.         //get the uploaded file based on GUID        
    32.         $mvcfile=$uploader->GetUploadedFile($fileguid);        
    33.         if($mvcfile)        
    34.         {        
    35.           echo "this is a test!"
    36.         }     
    37.     }     
    38.  
    39. ?> 
    40.  
    41.     </div> 
    42.   </body> 
    43. </html> 
     

    Regards,

     

    Ken

View Complete Thread