Hello.
I have text file which data is sepearated by quoma .
What i have to is take that data and stored in mysql table giving the browising facility to user browse such file and the data should be stored in table.
Please Help its very urgent
Thanx in advance
Importing data from text file into mysql through PHP page
Moderator: General Moderators
-
sukhpreet_ahluwalia
- Forum Newbie
- Posts: 3
- Joined: Sat Mar 22, 2008 5:09 am
Re: Importing data from text file into mysql through PHP page
It' s quite complicated for a beginner to do this. You have to know about working with files, string and array operation plus mysql.
First you read the file use fopen then fgetcsv to take the line in question in to a string Use explode on the string to turn into an array. After this you use the mysql function to connect to a database and execute the query. Good luck!
First you read the file use fopen then fgetcsv to take the line in question in to a string Use explode on the string to turn into an array. After this you use the mysql function to connect to a database and execute the query. Good luck!
-
sukhpreet_ahluwalia
- Forum Newbie
- Posts: 3
- Joined: Sat Mar 22, 2008 5:09 am
Re: Importing data from text file into mysql through PHP page
Please Help me to give the code ....... about this whole logic if possible