ChrisLeah Posted September 20, 2006 Share Posted September 20, 2006 <? $sql_features = mysql_query("SELECT * FROM faq;");while($feature = mysql_fetch_assoc($sql_features)); { ?><select name="faq"><option value="0">Choose Feature</option><option value="<a href="http://www.gangsternation.net/faq.php#<?=$feature['id']?>"><?=$feature['heading']?></option></select><? } ?>this code shows nothing but the first option, "Choose Feature". I have no idea why it will not show the rest. Please help? It sapart of a drop down menu, all the headings are in the DB. I want it so they can select from the list and it go to the anchored postition by clicking it.please help?thanks,Chris Quote Link to comment https://forums.phpfreaks.com/topic/21454-html-php-problem/ Share on other sites More sharing options...
sasa Posted September 20, 2006 Share Posted September 20, 2006 in line [code]while($feature = mysql_fetch_assoc($sql_features)); { ?>[/code]remove ; Quote Link to comment https://forums.phpfreaks.com/topic/21454-html-php-problem/#findComment-95640 Share on other sites More sharing options...
ChrisLeah Posted September 20, 2006 Author Share Posted September 20, 2006 Thank you, but not I get all the options in seprate drop down lists. How can I do it so it shows all headings and links once clicked to teh correct anchor its automatically given once in DB?thanks again. Quote Link to comment https://forums.phpfreaks.com/topic/21454-html-php-problem/#findComment-95646 Share on other sites More sharing options...
AdRock Posted September 20, 2006 Share Posted September 20, 2006 are you trying to get something like http://www.gangsternation.net/faq.php#somethingtry this[code]<option value="<a href="http://www.gangsternation.net/faq.php#<? echo $feature['id']; ?>"><? echo $feature['heading']; ?></option>[/code] Quote Link to comment https://forums.phpfreaks.com/topic/21454-html-php-problem/#findComment-95733 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.