Quick script help (user accounts)

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Andrew2010
Forum Newbie
Posts: 4
Joined: Mon Nov 01, 2010 9:59 pm

Quick script help (user accounts)

Post by Andrew2010 »

Hi, I have a website in the works, and I just finished the login/register/user account pages, but, the particular script I used doesn't allow members to view each others account pages. I would really appreciate it if someone could help me configure this php script. I was also wondering how to have each user have their own address (e.g. www.example.com/user/username or username.example.com)

I really hope someone can help me with this. Thanks.
User avatar
Jonah Bron
DevNet Master
Posts: 2764
Joined: Thu Mar 15, 2007 6:28 pm
Location: Redding, California

Re: Quick script help (user accounts)

Post by Jonah Bron »

Just compare the page to the session. If that's not the user that's logged in, give an error message.

As for the user page, you need Apache mod_rewrite. You can redirect, for example, /user/username to /user.php?user=username. Just google "mod_rewrite" or "pretty urls".
Post Reply