I am trying to display all entries in MySQL database table in a php page, but for some reason it is only showing the most recent. I think there are 10 entries at the moment, although there will be more.
Here is my code:
<?php
//connect to the server
$connect = mysql_connect("localhost","...","...");
//connect to the database
mysql_select_db("blog");
//query the database
$query = mysql_query("SELECT * FROM articles");
//fetch the results / convert results into an array
WHILE($rows = mysql_fetch_array($query)):
$article_id = $rows['article_id'];
$article_title = $rows['article_title'];
$article_content = $rows['article_content'];
endwhile;
echo "$article_id $article_title<br>$article_content<br><br><br>";
?>
Does anybody have any ideas?