> -----Original Message-----
> From: -{ Rene Brehmer }- [mailto:[EMAIL PROTECTED]
> Sent: 03 April 2003 15:28
> 
> On Wed, 2 Apr 2003 21:41:02 -0500, John Coggeshall wrote 
> about "RE: [PHP]
> Submit Image Button" what the universal translator turned into this:
> 
> >Well you can ignore it if you don't need the X/Y cord... But 
> you can use
> >it to make sure the button was clicked:
> >
> >If(!$_GET['sub_x'] || !_GET['sub_y']) {
> >     // display form
> >} else {
> >     // it was submitted
> 
> If you can't click the button without getting both a X and Y 
> coordinat,
> wouldn't it make more sense to use AND instead of OR in the 
> above logex??

Since clicking the button gives you both X and Y co-ordinates, and not clicking it 
gives you neither, why even bother checking both?  Just testing one or the other would 
be quite sufficient.  (And, if you insist on testing both, it makes no difference 
whether you use and or or -- just so long as you don't use xor!)

Cheers!

Mike

---------------------------------------------------------------------
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
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

Reply via email to