Forum Moderators: coopster
I could use .htpasswd password for every user but this could become quite cumbersome and I would prefer to not scare any users with popups. So I am looking for a php/mysql solution.
If someone knows of a great open-source script that I could, if nothing else, study for ideas that would be very helpful.
Otherwise, any tips for encrypting the password into the database and how to send the user his original password. Should I be sending passwords over email?
Since, no doubt, many of you have already been through this, maybe just a link to a great tutorial or some personal tips would be enough.
On my site I have the password encrypted but also a pin number for secondary level authorisation encrypted too. This is used by a lot of banks and is pretty effective, especially if you are using cookies and someone else has gained access to someone else`s account.
[devarticles.com...]
It pretty much covers all the basics
I know about ssl, but don't want to use it, because of the popup window "You're coming into ssl secure page" and "You're going out of ssl secured page".
I know it can be done because if you look what yahoo is sending it's just crap :)
Best wishes
Michal Cibor
PS. To avoid password comparing I use such function:
$passHash = md5($user.$pass)
[sourceforge.net...]
You'll need Paul Johnson's Javascript MD5 to go with it (supposedly the same algo that Yahoo! uses).
[pajhome.org.uk...]
Tom
Just a few quick questions though,
If I am using php/mysql, do I still need javascript for encryption also?
I was considering just not using cookies at all and just relying on the session variable because I would prefer that the customers log in each and every time. That way they can't have themseleves auto-logged in and have wife/employee/kids screw up any of their settings and they blame it on me. Is this a bad or good idea, or should I include cookies along with the sessions anyway?
Sessions ARE cookies
or at least, you need cookies to store session vars
I am not positive but i'm pretty sure session variables can be passed page to page and do not need the use of a cookie. The only example I can think of is phpbb. It's backup option if the person has cookies disabled is to use session variables.
You could also just use a pre-written authentication class - check [pear.php.net...] or google for Pat_user, both will be top-notch authentication options.
I looked at my webhost to see if it was installed and found nothing but from what little reading I did I see that it is part of newer versions of php? Will I still need to contact my host to see if it is installed/setup? Side-note, my host is the same people who host the pear.php.com website, should I just assume they already have it setup?
I am not positive but i'm pretty sure session variables can be passed page to page and do not need the use of a cookie. The only example I can think of is phpbb. It's backup option if the person has cookies disabled is to use session variables.
yes, there is another way, store them in the url
A visitor accessing your web site is assigned an unique id, the so-called session id. This is either stored in a cookie on the user side or is propagated in the URL.
session variables are always used for sessions btw, at least, if you set some, no matter how they are used, as a cookie or in the url ;)