I have a text file like this names ernakulam.txt which has content like this:
name1
name2
name3
name4
name5
I want to insert this value into my Mysql database table named places. Mysql table has fields like this:
dist_id | name
_________|______
|
|
In this table field1 (dist_id) should be same for all rows. The dist_id value is 6. How to read those names from text file and insert to Mysql table using php?
while($dat=fread($res));