Can you give more details? Are you using LOAD DATA LOCAL INFILE?
if($HTTP_POST_VARS['cmdup'])
{
$user="root";
$pass="";
$dbase="attendence";
$server="localhost";
$conn =mysql_connect("localhost","root","") or die("Connection attempt failed - ".mysql_error());
$db = mysql_select_db("attendence",$conn) or die(mysql_error());
echo $db;
$handle = fopen ("C:\\Program Files\\typo3\\attendence\\ats.txt","r");
echo $handle."<br>\n";
while ($data = fgetcsv($handle,1000,"\t"))
{
$sql="insert into ats (empno,emp_name,shift,arrvl,out1,in2,out2,in3,out3 ,late,early,wkrhr,exthr,prs,remarks)
values('$data[1]','$data[2]','$data[3]','$data[4]','$data[5]','$data[6]','$data[7]','$data[8]','$data[9]','$data[10]','$data[11]','$data[12]','$data[13]','$data[14]','$data[15]')";
$result = mysql_query($sql) or die("Invalid query: .<br>\n " .mysql_error());
echo $sql;
}
in this first line it give error Resource id #4
this is the code now when i click on the upload button it insert null value into the table.so what can i do. i also used LOAD DATA INFILE but it is not working.so plz give reply immediate.
my file is like
sr_no empno empname
1 1 aaaaaa
2 2 bbbbbb
and it is a text file.