views:

90

answers:

3

Hello I have my website and it's form is like this:

  1. Information

  2. More information

  3. Yet more information

I want to allow users to register a username a password so that they can log in and leave comments on the items 1,2,3 etc. Each item of information is stored in a mysql table, so to generate the page, each item 1,2,3 etc is a row/record from the table.

I am looking for a guide/resources on how to accomplish user registration and commenting on my items.

Thanks

+1  A: 

You will find a good tutorial that takes you through the steps to create a login for your website with PHP here.

After you get the login to work you can modify it to suit your particular circumstances.

Most likely you will have to create a table with userid and itemid to store which user has access to which item.

Vincent Ramdhanie
+1  A: 

User registration is fairly straight forward. Create a form that asks for information about the user that you desire, probably protect it with some sort of captcha (I'd recommend recaptcha). A lot of registration includes some sort of email verification, but I find that annoying.

As to commenting, I'd create the idea of a permission. Anyone not logged in has the "guest" permission, which doesn't allow commenting, and logged in users have the "user" permission and therefore can comment on content.

Myles
A: 

net.tutsplus has been doing a series of videos on how you can use the CodeIgniter PHP framework to accomplish many different things on a website such as a login screen. I think after you watch this video you have a better understanding of what you will need to implement your security requirements and also see an example of the MVC pattern that is very common nowadays.

Good luck and hope this helps you.

Chris