Mike,
If you have your error reporting set to ALL in php.ini, you will get
warnings that variables aren't set. The @ before it will ignore the
warnings. At least, this is one use of the @ before variables that I can
think of...
Evan
-----Original Message-----
From: Mike Flynn [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 20, 2001 9:23 AM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] What does an @ sign before a VARIABLE do?
Hey all,
In the PHOBUILDER tutorial on sessions the sample code has a @ sign before
some of the variable names.. like:
if (@$userid && @$password) {
$res = @mysql_query("SELECT userid FROM users WHERE userid='$userid' AND
password='$password'");
if(@mysql_num_rows($res) != 0) {
$verified_user = $userid;
session_register("verified_user");
}
}
I've never seen that before and am curious what it does. I've seen it
before function calls, but never before variables.
Thanks!
-Mike
-=- Mike Flynn - Burlington, VT -=-
[EMAIL PROTECTED] http://www.mikeflynn.net/ * Give blood *
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]