hi,
im trying to create a simple php page that where a user selects a text file on their local machine that they can submit the file content to a mysql database table. The first part of the code is where the file is select , then with an form action the user the sumbit that address to the query...where it should add the details of where the file can be found, to the variable "$fileload". Which then is included in the sql query.
The problem is that it is not submitting anything to the database?? can anyone see why?
Thanks for any help in advance
Fimbria
<?php
include "db.php";
if(!isset($fileload)){
print"<form name=\"frm\" method=\"post\" action=\"add3b.php\">";
print"Enter address of file (e.g. <b>filename</b>.txt)<br><br>
Address of File:";
print"<br><input type=\"file\" name=\"fileload\" size=\"30\"><br>";
print"<br><br><input type=\"submit\">";
print"</form>";
}else{
$query="LOAD DATA LOCAL INFILE '$fileload'
INTO TABLE test FIELDS TERMINATED BY '\t' LINES TERMINATED BY '\r'
IGNORE 1 LINES";
mysql_query($query);
print"File Added: $fileload";
}
?>
</body>
</html>