Received: from cooee.cybersydney.com.au (cooee.cybersydney.com.au [203.25.173.1]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f2E4DVx33618 for ; Tue, 13 Mar 2001 23:13:32 -0500 (EST) (envelope-from csmith@squiz.net) Received: from smith.squiz.net (pc163.cybersydney.com.au [203.25.173.163]) by cooee.cybersydney.com.au (8.8.7/8.8.7) with ESMTP id PAA26693; Wed, 14 Mar 2001 15:17:24 +1100 Message-Id: <4.3.2.7.2.20010314144332.00cd87e0@203.25.173.1> X-Sender: csmith@203.25.173.1 X-Mailer: QUALCOMM Windows Eudora Version 4.3.2 Date: Wed, 14 Mar 2001 15:13:29 +1100 To: "Christian Marschalek" , "[PHP] PostgreSQL" From: Chris Subject: RE: Re: Re: Secure pages In-Reply-To: References: <4.3.2.7.2.20010314092748.00b43b60@203.25.173.1> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Archive-Number: 200103/20 X-Sequence-Number: 204 Hey, > > As someone else suggested, have a check on each page for a > > session variable > > (which of course is set when they login). > > > > > if (!isset($sessionvariable) { > > header("Location:login.php"); > > exit; > > } > > ?> > >will do.. what excatly are session variables? check out http://www.php.net/manual/en/ref.session.php for session info.. > > This can be in an include file, as a function (just remember to globalise > > variables! I always forget :P), that way it will get checked on all your > > protected pages :) > >globalise? there are no global variables in php, are they?;) With functions, you can either pass variables or reference variables outside the function (for example, with a login function)... if they aren't passed to the function & need to be referenced, they have to be a global variable. Example below.. If you don't globalise the variable, then the form action will be nothing, because the function doesn't know what it is or where to get it's value from. Make sense? function print_login_form () { global $PHP_SELF; ?>
Name

Password