I need tips on creating and managing user accounts with PHP and mySql?

lyderslim

New member
I've finally gotten to the point where my web site is "database-driven" with mySql and PHP -- thanks to online tutorials on PHP. Now I'd like to go to the next step and have the ability for my customers to have user accounts to manage their personal data.

At first, I am not going to allow them to setup accounts. I will be setting up all new accounts myself. I am also not storing any sensitive information - like credit cards or social security numbers.

Initially -- I just want a customer to be able to login and change his mailing address or something similiar.

So I've searched a little on the web for great examples or tutorials on this, but haven't found anything that shows me how to pass data from page to page to show that they are already logged in and how to make that secure -- or anything else I need to know to have the ability to log in and only show a page if they ARE logged in.

Can y'all help me find a great page or resource on this aspect?

BTW - I am an Oracle database programmer, by profession. So I don't need too much detail on the table structure part of this. ;)
 
It's not a big project, but this should help:

As project structure you will need:
- Admin: login / logout / add / edit / list / delete user
- Front end: login / logout / edit info

For storing user sensitive information (CC, password), you can use do the following:

Encrypt the password using MD5 (to compare the password you would need to encrypt the input in MD5 and to update you need to replace) . For the credit card information (or any information that you need to retrieve) encrypt with other method so you can retrieve it. For the credit card number only, when displaying, only display the last 4 digits.

If you will be working with sessions, all the sensitive information should be encrypted.

Nothing is sent by GET.

All login process or process that sends sensitive information should use https.

Anyway, these are only notes and tips, most will go by reasonable sense and paranoia (which you should in cases of using Credit Card).

I got some stuff that can help you on my blog bellow.

Have fun.
 
Back
Top