I want to use a csv file to update the mysql scv table. how to code ? I have no experiece doing this job.
<p>please select a scv file to upload</p>
<form action="index.php" method="post">
<input type="file" name="scv" />
<input type="submit" value="submit" />
</form>
<?php
mysql_connect('localhost','root','admin');
mysql_select_db('linjuming');
// how to upload a scv file and insert or update the "csv" table?
?>

Your upload file:
Your
upload_target.php$ext = pathinfo($_FILES[‘file’][‘name’], PATHINFO_EXTENSION);
Very basic and with very few checks / validations. The
print_r($data)contains one line of your csv that you can now insert in your database.However, I would recommend using PDO or MySQLi for that task, since the mysql functions of PHP will be deprecated in the future.