Pamberella Posted April 10, 2012 Share Posted April 10, 2012 Hi there, I’m hoping someone can help me, I’ve very new to PHP (as you can probably tell by the poorly worded title) so please bear with me and I hope this makes some sense! I have a webpage that displays articles from a MySQL database, each article is made up of a unique ID, Date, Title, Summary and Text. I have a page which displays all articles from within the database (code shown below) <?php $db = mysql_connect("localhost", "blabla", "password"); mysql_select_db ("blabla", $db); $result = mysql_query("SELECT * FROM Articles");// while($row=mysql_fetch_array($result)) { echo$row['ID'];// echo "</br>"; echo$row['Date'];// echo "</br>"; echo$row['Title'];// echo "</br>"; echo$row['Summary'];// echo "</br>"; echo$row['Text'];// } ?> This page works fine but I want to be able to make an option within the page so that each article can be linked to its own page (displaying the articles ID, date, title, summary and text), so that if a button or the article ID is to be clicked upon that selected article will open in its own separate page. I am having major trouble doing this, I tried to send it through a URL but that was a pretty stupid idea for that amount of data from a database and didn’t work. I was wondering how I can go about making it so every article can be viewed separately in a page of its own. Thank you so much! Quote Link to comment Share on other sites More sharing options...
Muddy_Funster Posted April 12, 2012 Share Posted April 12, 2012 Let's see your table structure, also you do realise you posted this in the MS SQL forum and not the MySQL one right? Quote Link to comment 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.