View Full Version : PHP User Authenication and Re-direct
[Ostrich]
15-01-2001, 12:56
Just another easy one from me... shyea, right!
I'm creating a PHP site (...for some strange reason) and want to have an are where users can login and are redirected to a different area.
1) How hard is this gonna be?
2) Is there something I can use that will do this for me?
Thanks
:)
Someone covered that in the PASSWORDS thread below and left a link to a tutorial.
Here you go, the link Elmo mentioned is:
http://www.zend.com/zend/tut/authentication.php
[Ostrich]
15-01-2001, 14:06
Ta, I'll take a look.
In the time since I posted this I have created a mySql database.
I am now going to have a sleep.
:)
[Ostrich]
15-01-2001, 14:11
Hmmmm that tutorial seems to be for a pop-up kinda thing.
I want a form on my page... so they enter username and password.
:)
Well, you could create a table of users in your MySQL and then have them enter their user name and password into a form. The form is posted to a php page which looks them up and checks if their password is right. If it is, it re-directs to a URL... That the sort of thing you're after?
[Ostrich]
15-01-2001, 15:35
YES!
I have the mySql done already. But my php and html skills are... dire ;(
:)
[Ostrich]
15-01-2001, 16:43
OK, is this right
.html - uses a form to obtain username and sends it to a php page.
.php - queries the mysql databse. If the username matches the password it redirects to the correct page, if not it returns an error or another redirect.
sql database - holds usernames and passwords
All I need now is the code ;(
:)
i have done it in PHP using Access as my DB, I can send you the code if ya want
- Spawno
ICQ: 32666183
vBulletin® v3.7.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.