By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,640 Members | 2,597 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,640 IT Pros & Developers. It's quick & easy.

Read the contents of a text file into MySql using PHP

P: n/a
Hi All,

New to this, have the basics, can build a form and such. My problem is I
need to be able to open a file on a pc/s on the network, read the data
character by character, check to see if a certain character is present, if
it is, update the database and continue reading the file until it comes
across the character again, updates the database and so on . . . .

Anybody got any suggestions, all help gratefuly received!!

Jan 23 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
John Smith wrote:
Hi All,

New to this, have the basics, can build a form and such. My problem is I
need to be able to open a file on a pc/s on the network, read the data
character by character, check to see if a certain character is present, if
it is, update the database and continue reading the file until it comes
across the character again, updates the database and so on . . . .

Anybody got any suggestions, all help gratefuly received!!
Hi John,

Go to www.php.net and search for:
- fopen() and file() to open and read files (even over http)
- substr() to get pieces out of a string.
Or use the array-index approach:
$myStr = "hello";
echo $myStr[1]; // will echo e

Regards,
Erwin Moller
Jan 24 '07 #2

P: n/a
Cheers, I'll give it a go.

"Erwin Moller"
<si******************************************@spam yourself.comwrote in
message news:45*********************@news.xs4all.nl...
John Smith wrote:
>Hi All,

New to this, have the basics, can build a form and such. My problem is I
need to be able to open a file on a pc/s on the network, read the data
character by character, check to see if a certain character is present,
if
it is, update the database and continue reading the file until it comes
across the character again, updates the database and so on . . . .

Anybody got any suggestions, all help gratefuly received!!

Hi John,

Go to www.php.net and search for:
- fopen() and file() to open and read files (even over http)
- substr() to get pieces out of a string.
Or use the array-index approach:
$myStr = "hello";
echo $myStr[1]; // will echo e

Regards,
Erwin Moller

Jan 24 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.