You are here: Category checkboxes problem « PHP Programming Language « IT news, forums, messages
Category checkboxes problem

Posted by fiziwig on 03/24/06 18:34

Newbie here. I have a page that uses a <select> list to assign a
category to an itme, however it is possible for an item to have more
than one category assigned. Right now I have to enter the item and one
of the categories then go back to the edit item page to add a second or
third category.

What I'd like to do is to list the categories ias checkbox items
instead of in a <select> list. The problem is the category keys and
descriptions come from a MySQL atbel, and can be changed. So how do
associate a name and value with each checkbox when I don't know ahead
of time how many checkboxes there will be or what their category keys
will be?

I can do

<INPUT TYPE="checkbox" NAME="cb123" VALUE="on">Category Description
<INPUT TYPE="checkbox" NAME="cb137" VALUE="on">Category Description

Where "123", and "137" in the example are the category keys from the
SQL table, but then how would the page that recieves those values know
which possible variable names to look for?

Any ideas would be appreciated.

--gary

 

Navigation:

[Reply to this 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

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