aaaaargh... again... i dont know how many times i ran into this problem already...
Why does PHP process form fields with the value "0" the same as if it was ""??? and is there a function to check that with? (is_null() doesnt help much)
the problem i have is, im writing a test score script which should store the values from 0 points to 24 points in a database (float) - and if the field is empty it should store the value "-1" (or NULL for that matter - doesnt make a big difference for me) - standing for "not handed in".
pretty much this is the only thing i need:
if (!$points) {
$points = -1;
}
but it also enters this conditional if $points == "0" - how do i distinct an empty field to a field with the value "0"?
thanks a lot in advance...
sid