Posted by Sonnich on 08/07/06 19:13
> > I found that it should work here too:
> >
> > if( !(isset($_POST[$part1[$i]]) && ($_POST[$part1[$i]] ==
> > "")) )
> > echo " checked";
> > else
> > echo "";
> >
> > Idea: checkbox is default checked, but only if set and set to nothing
> > it is not set.
> > Boolean algebra. Only if set, and set to nothing, then it is not set.
> >
> > But by some reason it does not work. I have done this a 147533 times,
> > and here it does not work. Why?
> >
> I think a misplaced closing parentheses:
>
You were right. This is what I have now:
if( !(isset($_POST[$part1[$i]])) && ($_POST[$part1[$i]] ==
"") )
echo " checked";
else
echo "";
but is still does not work. It sets them first time as it should, but
after that it inverts the selection.
I dont get it.
Any ideas anyone?
[Back to original message]
|