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
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 by the_site; 07-05-2009 at 11:19 PM. Reason: Clarification
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.
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
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 by misson; 07-06-2009 at 12:08 AM.
Be sure to read all pages linked in this post; they have further information that should prove useful. When asking for help, make sure you follow Eric Raymond's and Jon Skeet's guidelines for prompt, accurate responses. Please answer any questions I ask; they're not rhetorical (probably). Any posted code is intended as illustrative example, rather than a solution to your problem to be copied without alteration. Study it to learn how to write your own solution.Misson, not Mission.
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 by the_site; 07-06-2009 at 01:46 AM. Reason: Addition to my thread
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.
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.
Be sure to read all pages linked in this post; they have further information that should prove useful. When asking for help, make sure you follow Eric Raymond's and Jon Skeet's guidelines for prompt, accurate responses. Please answer any questions I ask; they're not rhetorical (probably). Any posted code is intended as illustrative example, rather than a solution to your problem to be copied without alteration. Study it to learn how to write your own solution.Misson, not Mission.
Here is a simple one if you are looking for a members only area...its not the best way to do it, but it does work
http://php.about.com/od/finishedphp1...login_code.htm
I would love to change the world, but they won't give me the source code
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 by drf1229; 07-14-2009 at 10:16 AM.
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 by xav0989; 07-14-2009 at 10:49 AM.
█ Xavier L | Community Public Relations Manager (Free Hosting Support)
█ Yes, my position is too cool to even exist!
█ How am I helping? Rate this post by clicking theicon below! (this is even better than "liking" a post)
█ Terms of Service | Acceptable Use Policy | x10Hosting Wiki