Can someone help me, please?
I am trying to return FIVE results from my blog, but am only getting one. Here is the code. Please explain what I have done wrong, so I can learn from my mistakes. Thanks, Rodney H.
<?php
if(!isset($start)) $start = 0;
// db conn info
require ("../inc/db.inc.php");
// "connecting2_db()" function on db.inc.php
$db = connecting2_db();
// SELECT all FROM the blog table and order by time
$sql = "SELECT * FROM best_blog ORDER BY timestamp DESC LIMIT " . $start . ", 5";
// Connect or die and tell us
$result = mysql_query ($sql,$db) or db_mysql_die(); // db_mysql_die(); on include, too.
// While our query is true, do this:
while ($row = mysql_fetch_array($result)){
$date = date("M. j, 'y",$row["timestamp"]);
$title = $row["title"];
$mood = $row["mood"];
$image = $row["image"];
$entry = $row["entry"];
$id = $row["id"];
// Begin display of entries:
echo "<div class='title'><h1>$title [$date]</h1></div>
<p>$entry</p>";
// If there is an image
if($image){
echo "<p><img src='$image' alt='$image' border='0'></p>";
}