Re: PHP-using HTTP Guru ?
| From: | brad lafountain | Date: | Mon, 11 Feb 2002 19:00:20 +0000 |
| Subject: | Re: PHP-using HTTP Guru ? | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-79951@lists.php.net to get a copy of this message | ||
--- Erik Price <pricee@hhbrown.com> wrote:
>
> On Monday, February 11, 2002, at 01:46 PM, brad lafountain wrote:
>
> > are you trying to do someting like?
> >
> > if(validuser)
> > {
> > print "hello valid user";
> > }
> > else
> > {
> > header("Location:
> > http://myhost.com/baduser.php");
> > }
>
> Yes:
>
> if (!isset($_SESSION['authenticated'])) {
> header("Location: ./index.php");
//this should work if you exit here
exit();
> }
>
> Which is included from every page on the site except index.php, before
> any page content is parsed/passed.
>
> > if thats what you want to do.. then it should work...
> > but there are much better ways of handling this..
>
> I'd be interested to hear about it.
im not exactly sure your setup or site needs...
but have you looked into http authencation?
you could configure apache to handle this nicely and you
wouldn't even need to write the l/p prompt...
>
> Thank you,
> Erik
>
> ----
>
> Erik Price
> Web Developer Temp
> Media Lab, H.H. Brown
> pricee@hhbrown.com
>
>
> --
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, visit: http://www.php.net/unsub.php
>
__________________________________________________
Do You Yahoo!?
Send FREE Valentine eCards with Yahoo! Greetings!
http://greetings.yahoo.com