Jump to content

Archived

This topic is now archived and is closed to further replies.

ChrisLeah

Html , php problem :(

Recommended Posts

<? $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

Share this post


Link to post
Share on other sites
in line [code]while($feature = mysql_fetch_assoc($sql_features)); { ?>[/code]remove ;

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
are you trying to get something like http://www.gangsternation.net/faq.php#something

try this

[code]<option value="<a href="http://www.gangsternation.net/faq.php#<? echo $feature['id']; ?>"><? echo $feature['heading']; ?></option>[/code]

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.