title: something not going properly with an import script
body: <p>I have this script which permits me to insert a csv file content into mysql, now, my problem is, i don't know why it puts the fields of date and mobile number in the same place. Both date and mobile number are different fields in the database, both varchar types.</p>
  
  <p>now, this is the code:</p>
  
  <pre><code>if (isset($_POST['submit'])) {
      if (is_uploaded_file($_FILES['filename']['tmp_name'])) {
          echo "&lt;h1&gt;" . "File ". $_FILES['filename']['name'] ." uploaded successfully." . "&lt;/h1&gt;";
          echo "&lt;h2&gt;Displaying contents:&lt;/h2&gt;";
          readfile($_FILES['filename']['tmp_name']);
      }
  
      //Import uploaded file to Database
      $handle = fopen($_FILES['filename']['tmp_name'], "r");
  
      while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) {
          $import="INSERT into imovo(date,time,location,rbpos_id,mobile_number) values('$data[0]','$data[1]','$data[2]','$data[3]','$data[4]')";
  
          mysql_query($import) or die(mysql_error());
      }
  
      fclose($handle);
  
      print "Import done";
  </code></pre>
  
  <p>It won't upload the data properly.
  Here is how it uploads the data, and the data won't go all into the database:</p>
  
  <pre><code>8/31/12,12:34:40,Tirane1,2345,662080090 8/32/2012,15:34:40 PM,Tirane2,2345,662080091 8/33/2012,18:34:40 PM,Tirane3,2345,662080092Import done 
  </code></pre>
  
  <p>If you see, the date and mobile number go together..</p>