RE: Is there a shorthand way to...?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm



On 22 November 2004 14:01, Al wrote:

> When handling $_POST[] values that may or may not be
> assigned, I am forever using:
> 
> if((isset($_POST['courses_list']) AND
> $_POST['courses_list']== 'Used'))
> 
> Is there a shorthand way of doing this without causing notice errors?

For genuine one-offs, I tend to use:

    if (@$_POST['courses_list']=='Used')

Otherwise, if I'm making multiple accesses to the $_POST[] element, I use
one of the other techniques already posted.

Cheers!

Mike

---------------------------------------------------------------------
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Headingley Campus, LEEDS,  LS6 3QS,  United Kingdom
Email: m.ford@xxxxxxxxxxxxxx
Tel: +44 113 283 2600 extn 4730      Fax:  +44 113 283 3211 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux