by mageamida » Sat Dec 15, 2012 3:00 am
this is the structure of my code, hope somebody here can help me.....
<?php error_reporting(0);
$conn = mysql_connect("localhost","root","") or die(mysql_error());
mysql_select_db("iplus",$conn);
if ($_FILES[file][size] > 0) {
$file = $_FILES[file][tmp_name];
$handle = fopen($file,"r");
do {
if ($data[0]) {
mysql_query ("INSERT INTO createdfault
( total number of columns are 197 )
VALUES
( '".addslashes($data[0])."', ) and so on..
");
}
} while ($data = fgetcsv($handle,10000, ",","'"));
header('Location: admin.php?success=1'); die;
?>
the problem is I cant insert all the data in the .csv file. I can only insert the data up to the 78th columns and when i try to complete all of the columns the loop stop. tnx