Password script needed
I know there are session and application variables in ASP. Is there something like this in PHP?
I need to make a password script with PHP. I would like it to prompt the visitor with the usual username/password and store it in a session variable, so as long as they don't close their browser, they don't have to re-type their logon info. But this NEEDS to be secure.
Any help welcome, but I'm looking more for literature than prefab scripts. Thanks!
Mark Hensler
If there is no answer on Google, then there is no question.
Mike Fisher posted this at 18:18 — 6th September 2000.
They have: 429 posts
Joined: Jul 2000
This one took me some time to find.
http://hotwired.lycos.com/webmonkey/00/05/index2a.html?tw=programming
Although I don't like Webmonkey a whole lot, I think this'll help.
Mike Fisher - TWF Conquerer
"Don't trust a spiritual leader that cannot dance."
Mark Hensler posted this at 05:11 — 7th September 2000.
He has: 4,048 posts
Joined: Aug 2000
thanks
I also found this:
http://php.net/manual/ref.session.php
I plan to prompt for username/password, then check it against a database. If they are authorized, start a session variable. Then everywhere they go on the site, they should have full access (or maybe muiltple level users, hmmm).
When they close their browser the session variables will be lost (this is good). Or when click a logout button, I execute a 'session_destroy' and teminate the session.
The next time they visit they will have to 'log on' again.
Mark Hensler
If there is no answer on Google, then there is no question.
Nightspirit posted this at 14:11 — 7th September 2000.
They have: 36 posts
Joined: Jun 2000
wow and i thought webmonkey was cool.
Mike Fisher posted this at 19:16 — 7th September 2000.
They have: 429 posts
Joined: Jul 2000
Oh, it's 'alright,' and all, but some times they really limit themselves in what they do. Some of their tutorials could've been simplified so much.
Ahh well, don't listen to me. I'm bad for your teeth.
Mike Fisher - TWF Conquerer
"Don't trust a spiritual leader that cannot dance."
Mark Hensler posted this at 18:22 — 8th September 2000.
He has: 4,048 posts
Joined: Aug 2000
It correctly checks user input with database for usename/password. Then it creats a session and registers a variable. Then I say:
$GLOBALS["var"] = "something";
But I can't seem to get this on other pages.
Also... when the use clicks logout, I execute a session_destroy(), but the session doesn't seem to die.
Anyone have any help?
Thanks
Mark Hensler
If there is no answer on Google, then there is no question.
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.