Please take a look at this code.... what is i have instead of average, above average, a two letter word?
<input type="checkbox" name="petite" value="petite" <? if (get_option('petite') == 'petite'){ echo 'checked="checked"';} ?>>Petite
<input type="check开发者_开发问答box" name="athletic" value="athletic" <? if (get_option('athletic') == 'athletic'){ echo 'checked="checked"';} ?>>Athletic
<input type="checkbox" name="average" value="average" <? if (get_option('average') == 'average'){ echo 'checked="checked"';} ?>>Average
<input type="checkbox" name="aboveaverage" value="above average" <? if (get_option('aboveaverage') == 'above average'){ echo 'checked="checked"';} ?>>Above average
$selectedCategories = array();
foreach(array('petite', 'average', 'athletic') as $category)
{
if (get_option($category) == $category)
{
$selectedCategories[] = $category;
}
}
$qry = mysql_query(
"SELECT performerid,pic0
FROM ".$table."
WHERE build IN('" . implode("', '", $selectedCategories) . "')
ORDER BY RAND() LIMIT 20;");
The two letter word problem
Above average is that word - my first invention
change your code to
name="aboveaverage" value="aboveaverage"
my prediction.
I will edit my answer after you clarify your question
精彩评论