Reply to Re: Reading from txt file

Your name:

Reply:


Posted by FayeC on 11/29/05 22:41

Sorry....the username is the first part of the line in the txt file:
user1, user2, user3, etc....
Those are just hypotetical and being used for testing purposes.
The login is a simple login using POST and the page receiving the POST
data is a page where images are displayed.
I was abble to just get the variable sent by the form and use that to
display the images since the images are named user1_1.jpg,
user1_2.jpg, etc....
But now I have to find a way to add a line like:
"Welcome to baby "familyname"'s page!"
The "familyname" is not the same as the username so I had the idea of
creating a simple txt file with :
username="familyname"
And then parsing the "familyname" out of the file.
The problem is that I was able to parse the username out of the txt
file but not the "familyname"...
How do I get that out of the txt file? Do I use file_get_contents?
I read about it but it didn't make sense since I don't want the whole
file in one single array....

Thanks,

FayeC

On 29 Nov 2005 10:29:23 -0800, "Sjoerd" <sjoerder@gmail.com> wrote:

>I don't know what $username is, so your explanation of what you want to
>do is not clear. Please describe your problem better.
>
>Furthermore, you can look into the file_get_contents function and the
>foreach construct. It will make your code more readable.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация