yo10208 Posted April 27, 2011 Share Posted April 27, 2011 I am building a blog server with dreamweaver and phpMyAdmin so I have an wpindex.php page showing the topics and a topic page, wptopic.php showing only that topic. I need to create a link from the wpindex.php to wptopic.php. The link is: wptopic.php?ID=<?php echo $row_Recordset1['ID']; ?> *Recordset1 is a query of the blog post table* However, when I tested it, all post's link are 'wptopic.php?ID=1'. How can I fix it? Also, in the wptopic.php page, there is a place to show comments. However, when there is no comment, there is still a 'says' word in the page. how can I make the 'says:' disappear when there is no comments? The Code: <p>Comment:</p> <p align="right"><?php echo $row_Recordset2['comment_author']; ?>says:</p> <p align="right"><?php echo $row_Recordset2['comment_content']; ?> *Recordset2 is a query of the blog reply table* Thks! Quote Link to comment https://forums.phpfreaks.com/topic/234816-blog-server-help/ Share on other sites More sharing options...
saurabhx Posted April 27, 2011 Share Posted April 27, 2011 You are probably not looping through the entire recordset, instead just using the 1st row only. Use something like this while($row = mysql_fetch_array($result)) { echo $row['ID']; } Quote Link to comment https://forums.phpfreaks.com/topic/234816-blog-server-help/#findComment-1206734 Share on other sites More sharing options...
yo10208 Posted April 27, 2011 Author Share Posted April 27, 2011 Sry but I don't quite unstand what you mean. The following code is a hyperlink. wptopic.php?ID=<?php echo $row_Recordset1['ID']; ?> Quote Link to comment https://forums.phpfreaks.com/topic/234816-blog-server-help/#findComment-1206736 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.