|
Posted by Good Man on 10/24/07 21:36
Good Man <heyho@letsgo.com> wrote in
news:Xns99D3B2DF71774sonicyouth@216.196.97.131:
> trading_jacks <MARKFERGASON@gmail.com> wrote in
> news:1193259058.228187.211090@k35g2000prh.googlegroups.com:
>
>> I am new to php and google doesn't allow for searching on the @
>> symbol.
>>
>> I have a script with the following line:
>>
>> if (@$type_toggle || @cat_toggle) {
>> do_query........
>>
>> What does the @ do? Can you give me a link so I can read about it.
>
> it surpresses error messages, so that if the variable "$type_toggle"
> or "$cat_toggle" doesn't exist, error messages/warnings will not be
> printed to the screen.
and by the way, in relation to the "register_globals" questions that have
gone around the last couple of days, the script above is a perfect example
of why register_globals should be turned off.
if register_globals is on, simply checking for a variable will ALWAYS
return true, so in the code above, $type_toggle and $cat_toggle BOTH exist
and the query will ALWAYS be performed.
Navigation:
[Reply to this message]
|