i have a browse page where i have checkboxes to allow members to select different age groups. I got the sort part all working, my problem is the boxes that are checked don't stay checked when the page is relaoded to show the new results.
here's what i have, i'm so lost ... if anyone can help i'd really appreciate it!
now if the age group was selected the box should be checked.... i don't know how to do this???PHP Code:if (isset($HTTP_POST_VARS['agesort']))
{
$setage = implode(", ", $HTTP_POST_VARS['agesort']);
}
else {
$setage = "2, 5, 3, 6, 4, 7";
}
PHP Code:
<td width="121"><input type = "checkbox" name = "agesort[]" value = "2" <?php if ($setage == 2) { ?> checked <?php }?>/>
13-17</td>
<td width="114"><input type = "checkbox" name = "agesort[]" value = "5" <?php if ($setage == 5) { ?> checked <?php }?>/>
36-45</td>
Thanks!



Reply With Quote


Bookmarks