[liphp] Users Auth...
Christopher R. Merlo
[email protected]
Fri, 6 Jun 2003 15:25:42 -0400
On 2003-06-06 11:44 -0400, Stephen <[email protected]> wrote:
> what I am trying to accomplish is when a certain user logs in it
> directs them to a certain page in a directory.
You could add a column to the login table which includes a relative
URL, or filename, or whatever, so that when you read all the login
info from the DB, you read this address as well, and then just load up
whatever page the table tells PHP to load.
For instance:
$login_query = "select * from login where id = \"$id\" and pw = \"$pw\"";
$login_result = @mysql_query( $login_query );
$row = @mysql_fetch_assoc( $login_result );
@include( "http://my.site.com/{$row[ 'url' ]}" );
...or something.
If you have groups of users, then you could simply add a group number
to the login table, and have a group table which details what page to
load.
Tell me if I'm missing your point.
-c
--
[email protected] http://turing.matcmp.ncc.edu/~cmerlo
Windows: More than enough rope.