thetoolman Posted December 17, 2008 Share Posted December 17, 2008 Hi there, I have a simple php script which displays the latest entries. I can insert them into the database and select the titles, however, they all seem to be going to the same post even though the id is different. For example, id?=5 id?=6 id?=7 etc will all go to the same page instead of going to the actual id. This is my code: $sql = "select * from categories, entries where entries.cat_id = categories.id order by dateposted desc limit 10"; $result = mysql_query($sql); while ($row = mysql_fetch_assoc($result)){ echo "<h1><a href='view_entry.php?id=" . $row['id'] . "'>" . $row['subject'] . "</a></h1><br />"; Does anyone have any ideas what I have wrong? Thanks Link to comment https://forums.phpfreaks.com/topic/137338-problem-with-ids-and-page-content/ Share on other sites More sharing options...
thetoolman Posted December 17, 2008 Author Share Posted December 17, 2008 actually, I worked it out. please close this thread. Link to comment https://forums.phpfreaks.com/topic/137338-problem-with-ids-and-page-content/#findComment-717551 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.