Hi All,
I am setting up news articles on the front page of my website so that only the date and subject of the article is displayed as a hyperlink. When the user clicks on the hyperlink they are directed to a page which displays the whole article.
I have created the code for the front page no problem:
$result = mysql_query("SELECT news_title, news_body, news_id, DATE_FORMAT(news_date, '%D %b %Y') AS
formattedRacedate FROM news ORDER BY news_id DESC LIMIT 10 ")or die(mysql_error());
while($article=mysql_fetch_array($result))
{
echo "<tr>";
echo "<td width=100px valign='top'>".$article['formattedRacedate']."</td>";
echo '<td><a href="news.php?article=' . $article['news_id'] . '">'. $article['news_title'] . '</a></td>';
echo "</tr>";
}
echo "</table>";
this is where my limited PHP knowledge starts to dry up!
What code do I need for "news.php" to ensure the correct article is displayed? The URL is correctly displaying the news_id at the end.
Thanks in advance for your help