[KLUG Members] php 4.3.10

bill bill at billtron.com
Fri Jan 28 15:01:48 EST 2005


On Fri, 2005-01-28 at 13:30, Adam Tauno Williams wrote:
> > > Also, when the scoring is calculated the new php doesn't seem to like 
> > > there not being anything passed in the $_POST[sub_score]
> > > if ($_POST["add_score"]) {
> > "doesn't seem to like" is a pretty vague statement.  What exactly is the
> > error message or bad functionality it gives?
> 
> Doesn't the above if mean that if there is not an add_score variable (or the
> add_score value is null or zero equivalent) defined in POST scope than the
> if-content doesn't get invoked?  I don't see how that generates any error
> (suspecting question is overly trimmed).

Methinks you are sharper than most.  You're indeed right.  If an "if"
function evaluates to zero (or null or nothing, depending on
circumstances), it is regarded as false.  Hence it won't execute the
script in curly braces  {}

I think we can be confident there is something else at work, like, for
example, the post values he mentions are different (sub_score vs.
add_score).  Once we see that, we know exactitude is lacking, and there
may be more information missing.  That's why I asked him for more
details.

kind regards,

bill




More information about the Members mailing list