$form_data1=$_FILES['form_data1']['tmp_name'];
$date=$_POST['date'];
$fcontents = file ("$form_data1");
for($i=0; $i<sizeof($fcontents); $i++) {
$line = trim($fcontents[$i]);
$arr = explode("\t", $line);
$name=$arr[0];
$item=$arr[1];
$points=$arr[2];
$sql = "insert into Points_Spent values ('$name','$item','$points','$date')";
mysql_query($sql);
echo $sql ."<br>\n";
if(mysql_error()) {
echo mysql_error() ."<br>\n";
}
}
Issue is in the $item some of the content may have a , ' " or other characters in them. How do i make it so the file will upload with these characters in the name of the item ?