^--- i guess the title says it all.. ^_^
so, how do you do this?
so, how do you do this?
<INPUT type="file" name="filename" enctype="multipart/form-data" style="FONT-SIZE: 11px; FLOAT: right; FONT-FAMILY: Tahoma">
if (isset($_POST['file_submit']))
{
if (!empty($_POST['filename']))
{
$filename = addslashes($_POST['filename']);
echo $filename;
$handle = fopen($filename, "r");
while (($data = fgetcsv($filename, 1000, ",")) !== FALSE)
{
$num = count($data);
echo "<p> $num fields in line $row: <br /></p>\n";
$row++;
for ($c=0; $c < $num; $c++)
echo $data[$c] . "<br />\n";
}
fclose($handle);
}
else echo "<B><center><FONT face=Tahoma color=#ff0000 size=3>Filename field empty. Please fill up all the fields.</b></FONT></center><br>";
}
Comment