Page 1 of 1

Importing data from text file into mysql through PHP page

Posted: Sat Mar 22, 2008 5:13 am
by sukhpreet_ahluwalia
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

Re: Importing data from text file into mysql through PHP page

Posted: Sat Mar 22, 2008 7:15 am
by Rovas
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!

Re: Importing data from text file into mysql through PHP page

Posted: Sun Mar 23, 2008 12:13 am
by sukhpreet_ahluwalia
Please Help me to give the code ....... about this whole logic if possible