Why is my PHP upload script not working on jquery Mobile?
<p>I Have PHP upload Script, and it's no problem, but if i use the jquery mobile, the upload file did'nt work. </p>

<p>This is my script</p>

<pre><code>    &lt;!DOCTYPE html&gt; 
    &lt;html&gt; 
        &lt;head&gt; 
        &lt;title&gt;Security&lt;/title&gt; 
        &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt; 
        &lt;link rel="stylesheet" href="jqm/jquery.mobile-1.1.0.min.css" /&gt;
        &lt;!--script src="jqm/jquery-1.7.1.min.js"&gt;&lt;/script&gt;        //if I Open this line, the upload script don't work.
        &lt;script src="jqm/jquery.mobile-1.1.0.min.js"&gt;&lt;/script--&gt;  //if I Open this line, the upload script don't work.

        &lt;/head&gt; 
    &lt;body&gt; 

    &lt;?php

     include "koneksi.php";

     if (isset($_POST[SAVE]))
     {

          $tglkirim    = $_POST[TGLKIRIM];
          $nopol       = $_POST[NOPOL];
          $jenis       = $_POST[JENIS];
          $namasupexp  = $_POST[NAMASUPEXP];
          $bkirim      = $_POST[BKIRIM];
          $kotatujuan  = $_POST[KOTATUJUAN];
          $jamm        = $_POST[JAMM];
          $jamk        = $_POST[JAMK];
          $namasopir   = $_POST[NAMASOPIR];
          $jkendaraan  = $_POST[JKENDARAAN];
          $sj          = $_POST[SJ];       
          $stnk        = $_POST[STNK];
          $sim         = $_POST[SIM];
          $lrem        = $_POST[LREM];
          $lkota       = $_POST[LKOTA];
          $lsign       = $_POST[LSIGN];
          $spion       = $_POST[SPION];
          $sabuk       = $_POST[SABUK];




          // $ukuran_gbr = GetImageSize($direktori);
          $lokasi_file = $_FILES['fupload']['tmp_name'];  //script for upload
          $nama_file   = $_FILES['fupload']['name'];      //script for upload
          $ukuran_file = $_FILES['fupload']['size'];      //script for upload  
          $tipe_file   = $_FILES['fupload']['type'];      //script for upload
          $direktori   = "fkendaraan/$nama_file";         //script for upload

          print_r($_POST);



             move_uploaded_file($lokasi_file,"$direktori"); //script for move upload file

             echo "Nama File   :&lt;b&gt;$nama_file&lt;/b&gt; sukses di Upload&lt;br&gt;";
             echo "Ukuran File :&lt;b&gt;$ukuran_file&lt;/b&gt; bytes&lt;br&gt;";  





          $sql="INSERT INTO tb_secure (tgl_kirim,
                                          nopol,
                                           jenis,
                                             namasupexp,
                                               bkirim,
                                                kota_tujuan,
                                                  jam_masuk,
                                                    jam_keluar,
                                                      nama_sopir,
                                                       jenis_kendaraan,
                                                         surat_jalan,
                                                           stnk,
                                                             sim,
                                                               lrem,
                                                                 lkota,
                                                                   lsign,
                                                                     spion,
                                                                       sabuk,
                                                                         nama_file,
                                                                           ukuran_file,
                                                                              direktori)                   
    VALUES('$tglkirim',
             '$nopol',
                '$jenis',
                   '$namasupexp',
                      '$bkirim',
                        '$kotatujuan',
                           '$jamm',
                             '$jamk',
                               '$namasopir',
                                 '$jkendaraan',
                                    '$sj',
                                      '$stnk',
                                        '$sim', 
                                          '$lrem',
                                            '$lkota',
                                              '$lsign',
                                                '$spion',
                                                   '$sabuk',
                                                     '$nama_file',
                                                       '$ukuran_file', 
                                                          '$direktori')";


         $sql2="INSERT INTO temp_gudang(nopol,tgl_kirim)VALUES('$nopol','$tglkirim')";                                                    

         $input=mysql_query($sql);
         $input2=mysql_query($sql2);



          if ($input &amp;&amp; $input2)
          {
             echo "&lt;strong&gt;Data berhasil dimasukkan&lt;/strong&gt;";
             //echo "&lt;script language='javascript'&gt;";
             //echo " alert('Data berhasil dimasukkan');";
            //echo " alert(print_r($_POST));";
             //echo "window.location='admin/index-admin.php';";
             //echo "&lt;/script&gt;
          }
          else
          {
             echo "&lt;strong&gt;Data tidak berhasil dimasukkan, check ukuran gambar, yg diperbolehkan kurang dari 1.5 Mb &lt;/strong&gt;";
          }


     } 
&lt;?php 
 if (isset($_SESSION['username']))
 {

 ?&gt;

&lt;div data-role="page" class="type-interior" data-theme="b"&gt;
&lt;div data-role="header"&gt;
        &lt;!--h1&gt;PT UNIMOS GRESIK&lt;/h1--&gt;
        &lt;h1&gt;CHECKLIST APPS &lt;/h1&gt;
        &lt;h2&gt;Security&lt;/h2&gt;
    &lt;/div&gt;&lt;!-- /header --&gt;
 Anda Login Sebagai  &lt;?php echo $_SESSION['username'];?&gt; 
    &lt;div data-role="content"&gt;   
&lt;form action="satpam.php" enctype="multipart/form-data"  method="post"&gt;
    Tanggal Pengiriman
    &lt;input type="text" name="TGLKIRIM" id="TGLKIRIM" value="&lt;?php echo "$today";?&gt;" /&gt;
    Nomor Kendaraan
    &lt;input type="text" name="NOPOL" id="NOPOL" value=""  /&gt;
    Nama
    &lt;select name="JENIS" id="switch-a" data-role="slider"&gt;
                          &lt;option value="Suplier"&gt;Sup&lt;/option&gt;
                          &lt;option value="Expedisi"&gt;Exp&lt;/option&gt;
    &lt;/select&gt;     

   &lt;select name="NAMASUPEXP" id="select-choice-a" data-native-menu="false"&gt;
     &lt;option &gt;Ekspedisi&lt;/option&gt;
       &lt;?php
        $sql="SELECT * FROM tb_exp_local";
        $hasil = mysql_query($sql);

        while($data=mysql_fetch_array($hasil))
         {
           echo "&lt;option value=$data[nama_exp] width=300&gt;$data[nama_exp]&lt;/option&gt;";
         }
       ?&gt;
    &lt;/select&gt;
    &lt;td colspan="3"&gt;Barang Yang Dikirim&lt;/td&gt;
    &lt;input type="text" name="BKIRIM" id="BKIRIM" value=""&gt;
    Kota Tujuan 
    &lt;!--input type="text" name="KOTATUJUAN" id="KOTATUJUAN" value=""  /--&gt;
    &lt;select name="KOTATUJUAN" id="select-choice-a" data-native-menu="false"&gt;
     &lt;option &gt;Kota Tujuan&lt;/option&gt;
       &lt;?php
        $sql="SELECT * FROM tb_exp_local";
        $hasil = mysql_query($sql);

        while($data=mysql_fetch_array($hasil))
         {
           echo "&lt;option value=$data[kota_tujuan]&gt;$data[kota_tujuan]&lt;/option&gt;";
         }
       ?&gt;
    &lt;/select&gt;
    Jam Masuk     
    &lt;input type="text" name="JAMM" id="JAMM" value="&lt;?php echo "$time";?&gt;"/&gt;
    Jam Keluar
    &lt;input type="text" name="JAMK" id="JAMK" value=""  /&gt;
    Nama Pengemudi
    &lt;input type="text" name="NAMASOPIR" id="NAMASOPIR" value=""  /&gt;
    Jenis Kendaraan
           &lt;select name="JKENDARAAN" id="select-choice-a" data-native-menu="false"&gt;
                  &lt;option&gt;Jenis Kendaraan&lt;/option&gt;
                  &lt;option value="Pick Up"&gt;Pick Up&lt;/option&gt;
                  &lt;option value="Colt Diesel"&gt;Colt Diesel&lt;/option&gt;
                  &lt;option value="Fuso"&gt;Fuso&lt;/option&gt;
                  &lt;option value="Truck bak Tertutup"&gt;Truck bak Tertutup&lt;/option&gt;
                  &lt;option value="Container"&gt;Container&lt;/option&gt;
            &lt;/select&gt; 
      &lt;table&gt;      
      &lt;tr&gt;
         &lt;td colspan="2"&gt;Surat Jalan&lt;/td&gt;&lt;td&gt;&lt;select name="SJ" id="switch-a" data-role="slider"&gt;
                          &lt;option value="Ada"&gt;Ada&lt;/option&gt;
                          &lt;option value="Tidak"&gt;Tidak&lt;/option&gt;
             &lt;/select&gt;&lt;/td&gt;
        &lt;/tr&gt;    
      &lt;tr&gt;
         &lt;td colspan="2"&gt;Buku KIR &amp; STNK&lt;/td&gt;
         &lt;td&gt;
            &lt;select name="STNK" id="STNK" data-role="slider"&gt;
            &lt;option value="Ada"&gt;Ada&lt;/option&gt;
            &lt;option value="Tidak"&gt;Tidak&lt;/option&gt;
            &lt;/select&gt;
         &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
         &lt;td colspan="2"&gt;SIM&lt;/td&gt; 
         &lt;td&gt; &lt;select name="SIM" id="SIM" data-role="slider"&gt;
                          &lt;option value="Ada"&gt;Ada&lt;/option&gt;
                          &lt;option value="Tidak"&gt;Tidak&lt;/option&gt;
              &lt;/select&gt;
         &lt;/td&gt;           
      &lt;/tr&gt;
      &lt;tr&gt;
         &lt;td colspan="2"&gt;Lampu Rem&lt;/td&gt;
         &lt;td&gt;&lt;select name="LREM" id="LREM" data-role="slider"&gt;
                          &lt;option value="Oke"&gt;Oke&lt;/option&gt;
                          &lt;option value="Tidak"&gt;Tidak&lt;/option&gt;
              &lt;/select&gt;
         &lt;/td&gt;          
      &lt;/tr&gt;
      &lt;tr&gt;
         &lt;td colspan="2"&gt;Lampu Kota&lt;/td&gt;
         &lt;td&gt;&lt;select name="LKOTA" id="LKOTA" data-role="slider"&gt;
                          &lt;option value="Oke"&gt;Oke&lt;/option&gt;
                          &lt;option value="Tidak"&gt;Tidak&lt;/option&gt;
             &lt;/select&gt;
         &lt;/td&gt; 
      &lt;/tr&gt;
      &lt;tr&gt;
         &lt;td colspan="2"&gt;Lampu Sign&lt;/td&gt;   
         &lt;td&gt; &lt;select name="LSIGN" id="LSIGN" data-role="slider"&gt;
                          &lt;option value="Oke"&gt;Oke&lt;/option&gt;
                          &lt;option value="Tidak"&gt;Tidak&lt;/option&gt;
              &lt;/select&gt;
         &lt;/td&gt;       
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td colspan="2"&gt;Kaca Spion&lt;/td&gt;
        &lt;td&gt;&lt;select name="SPION" id="SPION" data-role="slider"&gt;
                          &lt;option value="Oke"&gt;Oke&lt;/option&gt;
                          &lt;option value="Tidak"&gt;Tidak&lt;/option&gt;
            &lt;/select&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td colspan="2"&gt;Sabuk Pengaman&lt;/td&gt;
        &lt;td&gt;&lt;select name="SABUK" id="SABUK" data-role="slider"&gt;
                          &lt;option value="Ada"&gt;Ada&lt;/option&gt;
                          &lt;option value="Tidak"&gt;Tidak&lt;/option&gt;
            &lt;/select&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;/div&gt;&lt;!-- /content --&gt;
 &lt;/div&gt;&lt;!-- /page --&gt;

      &lt;tr&gt;
        &lt;td colspan="2"&gt;Upload&lt;/td&gt;
        &lt;!--td&gt;&lt;input type="file" name="fupload" /&gt;&lt;/td--&gt;
        &lt;td&gt;&lt;input type="file" accept="image/*;capture=camera" name="fupload" id="file"&gt;&lt;/td&gt;

      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td colspan="2" align="right"&gt;&lt;input type="submit" name="SAVE" value="SAVE"&gt;&lt;/td&gt;
      &lt;/tr&gt; 
      &lt;tr&gt;
         &lt;td colspan="2"&gt;&lt;a href="logout.php" data-role="button" data-icon="home" onclick='logout()'&gt;Log Out&lt;/a&gt;&lt;/td&gt; 
       &lt;?php
        echo "&lt;script language='javascript'&gt;";
        echo "function logout()";
        echo "{window.location.assign('logout.php');}";
        echo "&lt;/script&gt;";
        ?&gt;
      &lt;/tr&gt;
      &lt;/table&gt;
       &lt;/form&gt;



&lt;?php 
}
?&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>Why the Only upload script dont work? the other script like insert data and etc is work properly.</p>

<p>Anyone can Help me?</p>
