creating a user management using php mysql
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? pleas开发者_开发知识库e guide me to a good example and I can learn it and try out.
There is https://phpregister.com which I use. It's very powerful and easy to install and edit to create your own project from this script.
phpRegister default pages:
- Home
- Contact
- Sample
- Log In
- Sign up
- My Account section
- Details and manage of several adresses
- User Support (Helpdesk)
- Sample
Plus:
- Multi Language support
- Responsive design (Android and iOS support)
- Full compatible with Firefox, Chrome, Opera, IE10+ and Edge.
phpRegister Administration features:
- Charts of accounts registration
- Manage accounts
- Help desk
And there is a Sample version available for free: https://phpregister.com/home/#downloadsample
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
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.
You're better off using something like Drupal (http://drupal.org) instead of rolling out your own.
精彩评论