[PHP] Re: Nead Help With A Php Script

2002-03-31 Thread martinahingis
"Alain Kumschick FrançOis Robert" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hello, > > I need a php script that checks if the there is a cookie set with the users > username > and if not > it brings you to an other page and telling you that you are no

Re: [PHP] Re: Nead Help With A Php Script

2002-03-30 Thread Rasmus Lerdorf
> (c) Obviously, this won't prevent someone from > faking a username via the querystring, so you have to > specify that it's a cookie: > > if(!isset($_COOKIE["username"])) { > header("Location: http://www.mysite.com/login.php";); > exit; > } Note that nothing prev

[PHP] Re: Nead Help With A Php Script

2002-03-30 Thread Hugh Bothwell
Aaargh! typo... > if(!session_is_registered("username")) "])) { should be if(!session_is_registered("username")) { -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Nead Help With A Php Script

2002-03-30 Thread Hugh Bothwell
> I need a php script that checks if the there is a > cookie set with the users username and if not it > brings you to an other page and telling you that > you are not loged in! (a) Don't cross-post all over. (b) Cookies 'automagically' become global variables, so a simple version is