I’m populating all my categories in an admin panel on my products section. Something seemed to of broke lately, not sure what happened.
I use to be able to select as many categories for a particular product as I wanted and they would appear in ALL their respected categories on the front end based on what I selected in the back end admin panel.
Now they’re only populating on the site in one category no matter how many i have selected in admin. They remain highlighted in admin and the category id’s [category_id] are being passed into mysql. I’m not sure why it’s not reflecting on the website though. Any help would be greatly appreciated. Here’s some code:
[CODE]<?
$strParent=makeParentList();
if ($strParent!=””)
$sqlCategory=”select * from “.TABLE_CATEGORY.” where category_id not in(“.$strParent.”)”;
else
$sqlCategory=”select * from “.TABLE_CATEGORY.” order by category_id”;
$exeCategory = mysql_query($sqlCategory) or die(mysql_error());
$arrCategoryId=explode(“,”,$member_row[‘category_id’]);
?>
<!–select name=”category_id[]” id=”category_id” style=”width:140px;” onchange=”fill_list(this.value)” multiple–>
<select name=”category_id[]” id=”category_id” style=”width:140px;” multiple>
<option value=””>Select</option>
<? while($rsCategory = mysql_fetch_array($exeCategory)){ ?>
<option value=”<?=$rsCategory[‘category_id’]?>” <? if(in_array($rsCategory[‘category_id’],$arrCategoryId)) echo “selected”;?> title=”<?=stripslashes($rsCategory[‘category_name’]);?>”>
<?=stripslashes($rsCategory[‘category_name’]);?>
</option>
<? }?>