Reply to - setting checkboxes

Your name:

Reply:


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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация