Ok heres what i got
$fcontents = file ("$form_data1");
for($i=0; $i<sizeof($fcontents); $i++) {
$line = trim($fcontents[$i]);
$arr = explode("\t", $line);
$sql = "insert into Attendance values ('".
implode("','", $arr) ."',')";
mysql_query($sql);
echo $sql ."<br>\n";
if(mysql_error()) {
echo mysql_error() ."<br>\n";
}
}
The issue is. My txt files can look something like this.
Mark isuck lol
dan hesucks haha
Columns are seperated by tab. The issue is I only wanna get the first column. I could care less about the rest.