ccrevcypsys Posted November 19, 2007 Share Posted November 19, 2007 So when my code querys the db for all of the options section the value keeps equaling 1... Heres the code taken off of the view source: <select name="add" class="searchBox"> <option value="1" id="searchBox">New Music</option> <option value="1" id="searchBox">My Music</option> <option value="1" id="searchBox">Point Graph</option> <option value="1" id="searchBox">New People</option> <option value="1" id="searchBox">New Events</option> <option value="1" id="searchBox">Hottest Songs</option> <option value="1" id="searchBox">Highest Ranked People</option> </select> and those should match what it says in the database. here is the php that i use to pull this info. $addChoice=$db->select("SELECT p.*, H.portal_id FROM ".$glob['dbprefix']."StreamRush_portals p LEFT JOIN ".$glob['dbprefix']."StreamRush_myHome H ON H.portal_id != p.portal_id WHERE p.portal_id != H.portal_id ORDER BY p.portal_id "); Quote Link to comment Share on other sites More sharing options...
Wes1890 Posted November 19, 2007 Share Posted November 19, 2007 Change it to: <select name="add" class="searchBox"> <option value="1" id="searchBox">New Music</option> <option value="2" id="searchBox">My Music</option> <option value="3" id="searchBox">Point Graph</option> <option value="4" id="searchBox">New People</option> <option value="5" id="searchBox">New Events</option> <option value="6" id="searchBox">Hottest Songs</option> <option value="7" id="searchBox">Highest Ranked People</option> </select> Quote Link to comment Share on other sites More sharing options...
ccrevcypsys Posted November 19, 2007 Author Share Posted November 19, 2007 no it has to pull from the database so the php code for the select looks like this <?php $addChoice=$db->select("SELECT p.*, H.portal_id FROM ".$glob['dbprefix']."StreamRush_portals p LEFT JOIN ".$glob['dbprefix']."StreamRush_myHome H ON H.portal_id != p.portal_id WHERE p.portal_id != H.portal_id ORDER BY p.portal_id "); if($addChoice==TRUE){ for($i=0;$i<count($addChoice);$i++){ $index->assign("PORTAL_ID", $addChoice[$i]['portal_id']); $index->assign("PORTAL_NAME", $addChoice[$i]['portal_name']); $index->parse("index.portals"); } }else{ $index->assign("PORTAL_NAME", "You already have them all"); } ?> <select name="add" class="searchBox"> <!-- BEGIN: portals --> <option value="<?php echo $addChoice[$i]['portal_id']; ?>" id="searchBox"> <?php echo $addChoice[$i]['portal_name']; ?></option> <!-- END: portals--> </select> Quote Link to comment Share on other sites More sharing options...
ccrevcypsys Posted November 19, 2007 Author Share Posted November 19, 2007 Any ideas???? the tables look like this ----portals---- ----myHome---- ----customer---- portal_id ---+ id +-- customer_id portal_name +--- portal_id | customername customer_id -----+ position 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.