Page 1 of 1

Bringing up user data specifically depending on username.

Posted: Sun Aug 20, 2006 2:05 pm
by chrchcol
At the end of a validation page if the username is admin it redirects to another page.

If the username is anything else I want it to bring up a user page that is specific to a paticular username.

Is this easy to call from a database as long as the username is the the primary key?

Any ideas on the best way to code it?

Chris

Posted: Sun Aug 20, 2006 2:13 pm
by daedalus__

Code: Select all

if ($is_admin == TRUE)
{
    // Redirect to admin page
}

// Otherwise print the user page
Also, I don't see why the username needs to be a primary key.

Posted: Sun Aug 20, 2006 6:04 pm
by RobertGonzalez
I would receommend using the user id, not username. And it is easy to do.