ccrevcypsys Posted November 21, 2007 Share Posted November 21, 2007 i have a drop down menu that lets you add things to your home page. there are 2 databases that this info is pulled from Portals | myHome ---------------------------------- portal_id ----++----portal_id | portal_name customer_id | id | ---------------------------------- So the code is <select name='portal_id'> <?php $addChoice=$db->select("SELECT p.*, H.customer_id FROM portals p LEFT JOIN myHome H ON p.portal_id = H.portal_id WHERE H.customer_id != ".$ccUserData[0]['customer_id']." AND H.portal_id IS NULL ORDER BY p.portal_id"); for($i=0;$i<count($addChoice);$i++){ ?> <option value='<?php echo $addChoice[$i]['portal_id'];?>'> <?php echo $addChoice[$i]['portal_name'] ?></option> <?php } ?> </select> My goal is so that when people remove things it will show up in the option drop down. And it wont show the ones that are already on it. Right now it doesnt work like that. If somone could help i really need it... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.