client login system

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
dirksmith
Forum Newbie
Posts: 11
Joined: Fri Oct 07, 2005 4:19 pm

client login system

Post by dirksmith »

Hi

I'd like to set-up a simple client login page for my website that would direct logged in users to their own specific webpage - rather than a generic members page.

Does anyone have any advice on how a basic log-in set-up can be extended to achieve this?

I assume it will involve setting up individual client accounts. Or is it possible to simply associate a particular target page with a particular username and password - set by me?

I've searched on-line for tutorials on this but have yet to find anything on setting up a very simple client login system. Links to any tutorials on this would also therefore be appreciated.

Thanx!

Dirk
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Post by pickle »

Most login pages direct users to a specific page after logging in. You can set up that page to redirect users accordingly:

Code: Select all

<?PHP

$username = $_SESSION['username'];
$query = "select homepage from users where username = '$username'";

//... execute query and get homepage location ...

header("Location: $user_homepage");

?>
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Moved to PHP - Code.
Post Reply