views:

54

answers:

3

I am trying to find a good example that can help me to understand user registration and then management system. User management should show the items from the db and give the option to delete/modify and also create a new. I would like to use php and mysql . can any one please point me to the right direction to learn and try this.i searched online and so far i am able to find the user log in examples but nothing for this crud for beginners. I would like to show a log in page(new user registration is separate) and after logging in, show their saved items. next to each item show a delete, modify button. modify will show the item's current details and they can edit it. I have a page to create a new item so i can just provide a link in the manager but i am confused how the script will know that this new event is for this user. should i carry a session variable? please guide me to a good example and I can learn it and try out.

A: 

You're better off using something like Drupal (http://drupal.org) instead of rolling out your own.

Exception
+2  A: 

If your system is not supposed to be the next-generation all-in-one super CMS then rolling your one isn't that hard. However, IMO once you started to learn PHP and SQL and got a good understanding of those, things like 'User management should show the items from the db and give the option to delete/modify and also create a new' should be trivial to code. So my advise is to learn the tools first before trying to implement a whole system.

Also, remember to look into security aspects like input validation/sanitation in PHP when you're developing a web app. Here's an quite extensive tutorial about that topic: http://www.phpro.org/tutorials/Validating-User-Input.html

About your user/session question: you can either use cookies or a session id in the url to 'create' a session: http://www.php.net/manual/en/intro.session.php

tobiw
+1  A: 

I would recommend using the Zend OpenID functionality to plug into your code. That way you don't have to write the authentication stuff, let an external provider deal with it and only store mapping from userId to whatever settings you are storing.

Check out http://www.developer.com/lang/article.php/3781581/Authenticating-Users-with-OpenID-and-the-Zend-Framework.htm2 for a full walkthrough.

amccausl
sorry for revisitng this after a month. I somehow missed to give my comment. As of now I am stuck with the framework I have and will not be able to switch to zend frame. but I found this as a good reading. thanks.
Jay