Reply to Re: one checkbox selection

Your name:

Reply:


Posted by J.O. Aho on 12/10/06 13:08

ulyx wrote:
> How to block multiple checkbox selections
> http://www.smartwebby.com/PHP/Phptips2.asp

Use radiobuttons instead or you need to throw in javascript (don't use jscript
as it works on limited browsers) that checks if more than one checkbox is
marked, but how to do that, you should ask on a javascript newsgroup.


> how to pull out checkbox values ( written in db on this way: 1,2,3 (where
> the delimiter is the - , - sign) ?

$array=explode(',',$row[X]);

<input type="checkbox" name="something" <?php if(in_array("something",$array))
{ echo "CHECKED"; } ?>>


Don't say that the example will work right off, it's a long time since I used
checkboxes, but just make minor tweaks and it should work fine.


//Aho

[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

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