aspnetguy Posted February 14, 2007 Share Posted February 14, 2007 view_topic.php is the page it gets the id and goes to the database and loads the data on view_topic.php. When there is a different id it loads different data. That is what we have been trying to explain to you...that is a dynamic page. Link to comment Share on other sites More sharing options...
Anders Moen Posted February 14, 2007 Author Share Posted February 14, 2007 Yes, but I don't understand how my codes are gonna look and stuff....... Link to comment Share on other sites More sharing options...
jesh Posted February 14, 2007 Share Posted February 14, 2007 It'd be just like justsomeguy posted: <?php$id = intval($_GET['id']); //news.php?id=xxx$result = mysql_query("SELECT * FROM news WHERE id={$id}");if (!($news = mysql_fetch_assoc($result))) die("No news item found");mysql_free_result($result);echo "<div class=\"headline\">" . htmlentities($news['title']) . "</div>";echo "<div class=\"newsbody\">" . nl2br(htmlentities($news['body'])) . "</div>";?> It will display any news item, and you only have to change this code if you want all news items to change. Link to comment Share on other sites More sharing options...
Anders Moen Posted February 14, 2007 Author Share Posted February 14, 2007 YAY!I GOT IT!THANK YOU GUYS! :)Lol, sorry for big letters ^^Just really, really happy because I've tried to make my CMS system done since Christmas, and now it's done Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now