Hi there,
I have a multi numbers uploading [to sql table] form :
<input name="uploaded" type="file" required="" accept="text/plain" />
and php code is [php]
$target = “upload/”;
if(isset($_POST[‘submit’])) {
$target = $target . basename( $_FILES[‘uploaded’][‘name’]) ;
$ok=1;
if(move_uploaded_file($_FILES[‘uploaded’][‘tmp_name’], $target))
{
$filename = basename( $_FILES[‘uploaded’][‘name’]) ;
mysql_query("LOAD DATA LOCAL INFILE ‘upload/$filename’
INTO TABLE crm_temp_no
LINES TERMINATED BY ‘\n’
(temp_no) ");
echo 'successfully uploaded!' ;
}
else {
echo ‘fail’ ;
}
}
[/php]
it is uploading multiple numbers to row name ‘temp_no’ in the table ‘crm_temp_no’. Its okay.
Now, i need to insert a value at extra column ‘data_name’ from : <input type="text" name="dataname" />
This data_name want to insert ALL ROWS at a time.