开发者

How to take data from mysql and echo links on a page?

开发者 https://www.devze.com 2023-02-13 08:31 出处:网络
I am building a website where you can post a question and it creates a page for that question in mysql database. We have it currently so the link to that persons question is based off their name they

I am building a website where you can post a question and it creates a page for that question in mysql database. We have it currently so the link to that persons question is based off their name they enter in at the homepage. But I want to be able to display all of the que开发者_StackOverflow中文版stions in the databases as links on a page? I appreciate any help I'm still learning PHP. By the way, I am using php to build this. Sorry if this is hard to understand.


 $result = //some result value from query

 while($page = mysql_fetch_assoc($result)){
    echo "<a href='".$page['link']."'>".$page['linkvalue']."</a>";
 } //echo out the link in a tag and also value
0

精彩评论

暂无评论...
验证码 换一张
取 消