PHP multiuser login class or script
Posted
by FFish
on Stack Overflow
See other posts from Stack Overflow
or by FFish
Published on 2010-03-09T16:08:59Z
Indexed on
2010/04/27
17:53 UTC
Read the original article
Hit count: 309
I am looking for a simple but secure login script with mySQL PHP: sessions, MD5 that I can use with my exsisting database.
Cookies to store password + password recovery by email.
Change login/pass.
I do not need registering, I register the user myself with temp login/pass.
table agents
- agent1
- agent2
table albums
- album1, owner: agent1
- album2, owner: agent1
- album3, owner: agent2 ...
login.php
agent1 logs in and has access to his albums:
- album1
- album2
agent1 can edit his albums:
edit.php?ref=album1
but NOT edit.php?ref=album3 by changing the ?ref variable
© Stack Overflow or respective owner