RE: [PHP] { } or Exit; ?
| From: | Maxim Maletsky | Date: | Tue, 05 Sep 2000 08:59:45 +0000 |
| Subject: | RE: [PHP] { } or Exit; ? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-15253@lists.php.net to get a copy of this message | ||
aaa.... sorry...
I had an error right there in
if (!$password_incorrect)
it was supposed to be
if ($password_incorrect)
but the point was the security ...
oopss..
Thanks in Advance.
-----Original Message-----
From: Maxim Maletsky
Sent: Tuesday, September 05, 2000 5:56 PM
To: PHP General List. (E-mail)
Subject: [PHP] { } or Exit; ?
Hi gurus!
I've got a question:
what is more secure
{} or Exit ?
I am about to create a password protected section, do you think it is better
to do it this way:
$class->Here_I_am_checking_you();
if (!$password_incorrect)
echo 'Go to hell';
else
{
<P> here goes the hole page/script...
and on it's end again
}
or this way:
$class->Here_I_am_checking_you();
if ($password_incorrect)
Exit;
As long as I know whatever is below ' Exit ' will be simply killed... right
...
Is it secure enough?
Because I am also VERY sure that if a condition returned false what is in
brackets is just... skipped..
what is better?
Maxim Maletsky - maxim@j-door.com <mailto:maxim@j-door.com>
Webmaster, J-Door.com / J@pan Inc.
LINC Media, Inc.
TEL: 03-3499-2175 x 1271
FAX: 03-3499-3109
http://www.j-door.com <http://www.j-door.com/>
http://www.japaninc.net <http://www.japaninc.net/>
http://www.lincmedia.co.jp <http://www.lincmedia.co.jp/>