What is the @ before son Varible for

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
baselbj
Forum Newbie
Posts: 2
Joined: Tue Feb 13, 2007 7:51 am

What is the @ before son Varible for

Post by baselbj »

i am new at PHP and I've seen some code that look like this :

if (@$_POST['action']!="login")

what i need to know is what is the use of "@" before the $_POST variable. and what will happen if i dropped it ?

i don't know if this question is a stupid but can you help me :roll:
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Post by onion2k »

It tells PHP to suppress any error messages. It's bad and wrong and you should never use it.
ryuuka
Forum Contributor
Posts: 128
Joined: Tue Sep 05, 2006 8:18 am
Location: the netherlands

Post by ryuuka »

@ is the devil mkay
baselbj
Forum Newbie
Posts: 2
Joined: Tue Feb 13, 2007 7:51 am

Post by baselbj »

thank you for your help
Post Reply