Can you give more details? Are you using LOAD DATA LOCAL INFILE?
if($HTTP_POST_V ARS['cmdup'])
{
$user="root";
$pass="";
$dbase="attende nce";
$server="localh ost";
$conn =mysql_connect( "localhost","ro ot","") or die("Connection attempt failed - ".mysql_error() );
$db = mysql_select_db ("attendence",$ conn) or die(mysql_error ());
echo $db;
$handle = fopen ("C:\\Progra m Files\\typo3\\a ttendence\\ats. txt","r");
echo $handle."<br>\n ";
while ($data = fgetcsv($handle ,1000,"\t"))
{
$sql="insert into ats (empno,emp_name ,shift,arrvl,ou t1,in2,out2,in3 ,out3,late,earl y,wkrhr,exthr,p rs,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($sq l) 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.