PHP – multiple checkbox options
-
Hi!
I’ve tried several ideas to get this to work but, alas without any luck.The following code creates a “select” option which allows me to assign a category to act as a portfolio.
<select name="portfolio_cat" id="portfolio_cat"> <option value="none" <?php if ($theme_options["portfolio_cat"]=="none"):?> selected <?php endif; ?>>none</option> <?php $p_cats = get_categories('hide_empty=0'); foreach ($p_cats as $portfolio_cat) :?> <option value="<?php echo $portfolio_cat->cat_ID ?>" <?php if ($this->options["portfolio_cat"]==$portfolio_cat->cat_ID):?> selected <?php endif; ?>> <?php echo $portfolio_cat->cat_name ; ?> </option> <?php endforeach; ?> </select>
What I want is to have checkboxes instead, so I can assign several categories, instead of just one.
Any help is greatly appreciated!
Cheers
/v0ice
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘PHP – multiple checkbox options’ is closed to new replies.