[thelist] OR statement too true in PHP

Tim Fountain tim at incutio.com
Sun Mar 28 16:53:51 CST 2004


Joel,

On Sunday, March 28, 2004 at 23:16, Joel D Canfield wrote:

> Any idea why this statement evaluates to TRUE when
> $_POST[DisplayPhone] is 9876543210?

>   if (($_POST[DisplayPhone] == 0) OR ($_POST[DisplayPhone] == "") OR
> is_null($_POST[DisplayPhone]))

It won't.  It's more likely the variable isn't set for some reason.
Can you paste in the relevant portion of the exact code you're using?
Also check that your form field is called 'DisplayPhone' (case
sensitive), and that your form has the method POST and isn't using
GET.

-- 
Tim Fountain | Web developer | Incutio Ltd | www.incutio.com
Tel: +44(0)8708 700 333 | Fax: +44(0)7092 181 581



More information about the thelist mailing list