RAGIONE SOCIALE
                [1] => INDIRIZZO
                [2] => CAP
                [3] => LOCALITA
                [4] => PROVINCIA
                [5] => CODICE
                [6] => TELEFONO
                [7] => E-MAIL
                parapharmacy
                city
                address
                phone
                fax
                web
                email
                */
                if(is_uploaded_file($_FILES['file']['tmp_name'])){
                    $dest="tmpfiles/tmpparapharmacy";
                    if(move_uploaded_file($_FILES['file']['tmp_name'],$dest)){
                        $myfile = fopen($dest, "r") or die("Unable to open file!");
                            while(!feof($myfile)) {
                                $r = explode("|",fgets($myfile));
                                if($r[0]!='N_Albo' && $r[0]!=''){
                                    $q="INSERT INTO parapharmacy VALUES(
                                        '".addslashes(trim(anyToUTF8($r[0])))."','','','".addslashes(trim(anyToUTF8($r[3])))."',
                                        '".addslashes(trim(anyToUTF8($r[1])))."','".addslashes(trim(anyToUTF8($r[6])))."','','',
                                        '".addslashes(trim(anyToUTF8($r[7])))."')
                                        ON DUPLICATE KEY UPDATE
                                        parapharmacy='".addslashes(trim(anyToUTF8($r[0])))."',
                                        city='".addslashes(trim(anyToUTF8($r[3])))."',
                                        address='".addslashes(trim(anyToUTF8($r[1])))."',
                                        phone='".addslashes(trim(anyToUTF8($r[6])))."',
                                        email='".addslashes(trim(anyToUTF8($r[7])))."'";
                                }
                                mysqli_query($conn, $q);
                            }
                        fclose($myfile);
                        echo '
                                    
                                    File importato correttamente!
                                 
                            
                            ATENZIONE: Errore nell\'importazione del file!
                         ';
                    }
                }
            }else{
        ?>