Re: Additional PHP MySQL Data Processing of Uploaded Files

  •  10-31-2012, 9:51 AM

    Re: Additional PHP MySQL Data Processing of Uploaded Files

    Ken:

    Thank you very much.  After some manipulation I got the code to do exactly as I wanted.  There is only 1 issue however, although I get the progress table and status bar as the files are uploading, they disappear after the files are uploaded leaving only the "Select Multiple Files" button.  Is there a way to prevent the progress table results from being erased?  The code that I have added is:

     

    if(count($files)>0)  
        {  
            //Login and Connect to database
            //*********************************************************
           //Code here deleted for security but it works as the correct data for all files is being inserted into the database correctly 
          
            foreach($files as $mvcfile)  
            {  
                //$mvcfile->FileName is the original file name  
                $filename=$mvcfile->FileName;   
                $newspaper=substr($filename,0,2);
                $year=substr($filename,3,4);
                $month=substr($filename,8,2);
                $day=substr($filename,11,2);
                $page=substr($filename,14,strpos($filename,".")-14);
                
                $insertfile="INSERT INTO m_newspaperarchives(newspaper,year,month,day,page,filename) VALUES             ('$newspaper','$year','$month','$day','$page','$filename')"; 
                $insertfile2=mysql_query($insertfile) or die("<br />Could not insert file data into m_newspaperarchives table<br />");
            } 
    Best regards, Paul
     

     

View Complete Thread