Password
Moderator: General Moderators
-
alex_cunningham
- Forum Newbie
- Posts: 13
- Joined: Tue Jun 24, 2008 6:34 pm
Password
i need a php code that will read all the usernames and passwords out of a txt file
for example:
User name:password
for example:
User name:password
-
alex_cunningham
- Forum Newbie
- Posts: 13
- Joined: Tue Jun 24, 2008 6:34 pm
Re: Password
but i also need a sign up how do i edit the text file in a php code
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
-
alex_cunningham
- Forum Newbie
- Posts: 13
- Joined: Tue Jun 24, 2008 6:34 pm
Re: Password
???
can i get the code in English please
Last edited by alex_cunningham on Tue Jun 24, 2008 11:22 pm, edited 1 time in total.
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
Re: Password
You got it in english. I'm not here to write the code for you, I'm here to offer assistance. Try reading the links I provided first.alex_cunningham wrote:???can i get that in English please
-
alex_cunningham
- Forum Newbie
- Posts: 13
- Joined: Tue Jun 24, 2008 6:34 pm
Re: Password
you know hes the kind of people who drive people away from the forum
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
Re: Password
I'm sorry you feel that way. I don't think it's fair of you to not demonstrate any effort and expect us to do the work. I'm happy to explain it furthur if you need.alex_cunningham wrote:you know hes the kind of people who drive people away from the forum
What have you tried so far?
Re: Password
Actually, He's the kind of person who makes this site so worthwhile.
He *could* just give you the code ... you'd go away happy for five minutes, then want to get it to work slightly differently, and then realize that you had no understanding of how the code actually worked. Then you'd come back, and someone would fix it. All the while, you'd be going nowhere with PHP.
Seriously, take a look at the manual pages ... have a read and then make up a few test files and get a feel for how things work. See if you can tell how the commands would work together. It'll be sooooo worth your while.
And if you try and fail, come back and post your code. There are hundreds of people here, JCart included I'm sure, who would bend over backwards to help you understand where your code was going wrong.
We're here to help.
He *could* just give you the code ... you'd go away happy for five minutes, then want to get it to work slightly differently, and then realize that you had no understanding of how the code actually worked. Then you'd come back, and someone would fix it. All the while, you'd be going nowhere with PHP.
Seriously, take a look at the manual pages ... have a read and then make up a few test files and get a feel for how things work. See if you can tell how the commands would work together. It'll be sooooo worth your while.
And if you try and fail, come back and post your code. There are hundreds of people here, JCart included I'm sure, who would bend over backwards to help you understand where your code was going wrong.
We're here to help.
- Jasheppard
- Forum Newbie
- Posts: 24
- Joined: Tue Jun 17, 2008 11:44 pm
Re: Password
its easy. but there is no point in learning or using php if you don't know how to create forums and read data out of a file!
look in google... always help for me
but why go that far? i have seen examples in other topics on this forum.
look in google... always help for me
- Jasheppard
- Forum Newbie
- Posts: 24
- Joined: Tue Jun 17, 2008 11:44 pm
Re: Password
There are many ways on how to make a password/login system.
1. Databases...
2. Text files...
3. could even use session which is quite pointless.
But i would go for text files, for which i use on my website.
1. Databases...
2. Text files...
3. could even use session which is quite pointless.
But i would go for text files, for which i use on my website.
Simple, I would post the code but i am afraid its a bit too big.As Jcart said...
use file() to load each line into an array, foreach() to traverse the array, and explode() to seperate the elements on the colon.
Last edited by Jasheppard on Wed Jun 25, 2008 2:07 am, edited 1 time in total.
Re: Password
How did you go with those examples you found?
How did they not do what you want? Did you test them?
How did they not do what you want? Did you test them?