Login Secure Pages

the_site

New Member
Messages
159
Reaction score
1
Points
0
My recent project is doing a login page for members, but I have a question that follows after when I complete the Login script.

This may be a stupid question, but how do I make member pages?

Only the members can view
 
Last edited:

adamparkzer

On Extended Leave
Messages
3,745
Reaction score
81
Points
0
You'll have to store a cookie or some other form of authentication when your members log in. Then, you can use if statements or something basic like that if you're new to programming to check if the member is logged in properly and has permission to access the page.
 

the_site

New Member
Messages
159
Reaction score
1
Points
0
I did read on another page, storing a cookie.

Well it is certainly good to learn more as I go. I am only doing a project page, and this will certainly help me. I wish the most help I can get :D
 

misson

Community Paragon
Community Support
Messages
2,572
Reaction score
72
Points
48
There are some issues with cookies: they're blocked or disabled on some browsers, they shouldn't store sensitive information and they can be set client side, so they can't be trusted. Better use sessions (assuming you're using PHP; you should always state the software environment). Note that sessions usually use a cookie that identifies the session, but will transparently switch to using a URL parameter if cookies aren't working and all the session variables are stored on the server. This means the session can still be hijacked if someone gets ahold of the session ID. To prevent hijacking, store the IP address when a user logs in and compare it to $_SERVER['REMOTE_ADDR'] (again, assuming PHP, though REMOTE_ADDR is set as a CGI environment variable and is available to other web scripting languages).

"how do I make member pages?" is very ambiguous and broad topic. Could you be more specific?
 
Last edited:

the_site

New Member
Messages
159
Reaction score
1
Points
0
For examples: x10 we have member panels, we log in, we see the forum threads.
Or like you make a account for an online game, you log in, and your accessing pages only signed in member would view.

Making a login script would be fun, helpful, but I dont really know any uses for it. I was thinking of something neat... When a member registers and login, there will be a simple member page.
 
Last edited:

nirajkum

New Member
Messages
159
Reaction score
0
Points
0
few things which you need to do would be having a logout page first to clear the cookies.
Once the user is logged you should show the member page . If not you should redirect it to some page with the message that you are not logged-in and provide the link to login again.
 

misson

Community Paragon
Community Support
Messages
2,572
Reaction score
72
Points
48
For examples: x10 we have member panels, we log in, we see the forum threads.
Or like you make a account for an online game, you log in, and your accessing pages only signed in member would view.
It's still unclear exactly what you need. Do you want to know how to handle login? How to store user data? How to ensure only a user (or admin) can view the user's data (i.e. authorization)? Something else? If you don't know what help you need, no one else can tell you.
 

drf1229

New Member
Messages
71
Reaction score
1
Points
0
My way: Make a txt file that stores all the users' info: username, pw, and all the info on the page. Make a log in cookie to be stored when the user logs in. Then, when the user goes to his/her page, it reads the info off the txt file (based on the log in cookie) and writes to the doc accordingly. I can be more specific if you want, but thats basically what I do. (http://www.algebrahelper.webs.com!)
 
Last edited:

xav0989

Community Public Relation
Community Support
Messages
4,467
Reaction score
95
Points
0
In my website, I have two examples of member's only areas. One pretty advanced (although still in development) and one quite simple in terms of features. The simple one is called SUM for Simple User Management, and the advance one is called UserMan for User Management. I don't recommend using SUM for production environment unless you tweak it a lot, and UserMan is still in development (although the system is functional, there is no admin interface) so you might want to look at the code and get inspired.
If you do could you link back to my website?

Hoping that you could get some inspiration from my code!
 
Last edited:
Top