morocco-iceberg Posted March 23, 2010 Share Posted March 23, 2010 I'm attempting to code a blog system, and have currently go the ability to write a blog that is displayed on a seperate page, that can then be commented upon by visitors. What I would like to achieve now is a system that archives the blogs into seperate pages, whilst creating a link on the main page to each of these pages automatically. Any ideas of how to go about this? Quote Link to comment https://forums.phpfreaks.com/topic/196211-generate-new-pages-that-are-automatically-linked/ Share on other sites More sharing options...
Adam Posted March 23, 2010 Share Posted March 23, 2010 By separate pages I assume you don't literally mean a separate file? You'll want to store the article within a database, most likely MySQL. Then you can pass the ID (or some piece of data that can identify the article) through the URL to a file, e.g. view_article.php?id=###. Within the file you'll look up the article in the database and display the contents. On the front page you can simply query the database to return all the articles (or say the most recent 10) and generate the link based on the ID (or the data you use to identify the article). Quote Link to comment https://forums.phpfreaks.com/topic/196211-generate-new-pages-that-are-automatically-linked/#findComment-1030392 Share on other sites More sharing options...
morocco-iceberg Posted March 23, 2010 Author Share Posted March 23, 2010 Sounds like a better way than anything I can think of. No idea how to do that though... Quote Link to comment https://forums.phpfreaks.com/topic/196211-generate-new-pages-that-are-automatically-linked/#findComment-1030407 Share on other sites More sharing options...
Adam Posted March 23, 2010 Share Posted March 23, 2010 What experience do you have working with databases? Quote Link to comment https://forums.phpfreaks.com/topic/196211-generate-new-pages-that-are-automatically-linked/#findComment-1030410 Share on other sites More sharing options...
morocco-iceberg Posted March 23, 2010 Author Share Posted March 23, 2010 So far? Nothing other than playing with creating them and tables and adding information within the mysql monitor. Quote Link to comment https://forums.phpfreaks.com/topic/196211-generate-new-pages-that-are-automatically-linked/#findComment-1030423 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.