How would I start coding my user base for my site; I understand I’ll need a registration form but how do I start the process of building a system for users to join my site?
- Open text editor.
- Add “<?php”
- …
- Profit?
In all seriousness, take a look at some of the tutorials on nettuts - http://net.tutsplus.com/tutorials/php/user-membership-with-php/
Step 3 is the killer lol, thanks for the help!
Well, you could write a whole book on this topic, but the basics would include stuff like this:
- Have a database table which stores your user information.
– Amongst other things, this user information would need to at least store a username and password. - Figure out how you are going to encrypt your passwords (cleartext passwords = bad). At minimum, you should use the SHA encryption. Most systems also use a hash salt for this as well to encrypt it further.
- A login system.
– When you log in you need to check if the username and password match what’s stored in the database.
– If they do match, you want to set some session values so you know you’re logged in. - Something that uses it.
– No point in logging in if there isn’t any reason.
– You can check the session values to see if they’re logging in, and then proceed accordingly.