Chris wrote: > Luke wrote: >> 2009/4/22 PJ <af.gourmet@xxxxxxxxxxxx> >> >>> Could somebody explain to me the meaning of @ in $var = >>> @$_POST['title'] ; >>> where could I find a cheat sheet for those kinds of symbols or what are >>> they called? >>> Sorry for my ignorance, but maybe this will take the fog filter our of >>> my neurons. :-\ >> I believe placing an @ in front of a statement suppresses any error >> messages >> it generates. >> > > It does - in this case if 'title' is not posted as part of the form, > it would have generated a warning or notice (can't remember which). > > A longer path is: > > $var = ''; > if (isset($_POST['title'])) { > $var = $_POST['title']; > } > > The shortcut works but it makes it extremely difficult to find > problems with your scripts (think of 50 @'s being used in one script.. > eek). > Thanks for refreshing my memory... I had run across this but forgot as I usually do not use it. I turn on all error checking and stumble through prin_r() and var_dump() ... whatever. :-D -- unheralded genius: "A clean desk is the sign of a dull mind. " ------------------------------------------------------------- Phil Jourdan --- pj@xxxxxxxxxxxxx http://www.ptahhotep.com http://www.chiccantine.com/andypantry.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php