Jump to content

User Management System


etrader

Recommended Posts

I have created a very simple CMS by storing articles in mysql database. Everything is OK for my need; but I have no idea how to handle user management. I have created a table for users and a page to create new accounts.

 

But how I can restrict the article submission page to logged in users?

How I can show a widget of profile of logged users?

 

I think there are different ways to do so; define(), cookie, ....

What is the best method as CMSes normally use?

 

Thank you in advance  ;)

Link to comment
Share on other sites

In addition to gristoi's post:

 

You can also use cookies. I used to use sessions a lot for user tracking, but got more into using cookies instead. (Same thing pretty for the most part. Sessions = server side, Cookies = client side)

 

When I use cookies, I usually create a token associated with an IP address in the database. Then I send the token to the browser as sort of its temporary password. When they load the next page, I verify the token and the IP address. (To try and prevent cross-site hacks.)

 

Cookies

http://php.net/manual/en/features.cookies.php

 

XSS

http://www.acunetix.com/websitesecurity/xss.htm

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.