You really need to check out sessions. 1. user logs in by a form 2. php validates the login, checks for a valid uid/pwd 3. if valid, sets a session variable like $_SESSION['uid'] 4. you put session_start() at the top of each page, and php will know that they are logged in as "justin" or whatever.
Rather than passing around thier userid in the URL, you pass around a session id (long unique number) in the URL, and associate MANY session variables to it via either the URL or cookies (userid, first name, fav colour, preference for font size, preference for date format, whatever) on the server-side. The guts of it is a lot more complex than that of course, with many different options, but you get the drift :) What you would actually be testing for on each page would be $_SESSION['uid'], not $clientid or $_GET['clientid']. There are some simple examples on: http://www.php.net/manual/en/ref.session.php Cheers Justin on 21/12/02 1:20 AM, Edward Peloke ([EMAIL PROTECTED]) wrote: > Ok, > Newbie Question..... > I know have a login and registration page on my website. What is the best > way to check to see if the users have logged in before they access the other > pages? SHould I add to each of the other url's ?clientid='' and if it is an > empty string I know they haven't logged in? > > Thanks, > Eddie > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php