Hi All,
I am having issues with this functionality, I am a rookie PHP wise, and do not know how to progress with this.
I have a main content area on page which displays all records as below
<?php
$query = "SELECT * FROM latestnews ORDER BY date ASC limit 10";
$latestlistings = mysql_query($query);
echo "<table width='850px' border='0'>";
echo "<tr bgcolor='#f09450'><td colspan='4'><h2>Title</h2></td></tr>";
while($row = mysql_fetch_array($latestlistings)){
echo "<tr><td width='90px'>" . $row['date'] . "</td><td width='400px'><a href='article.php?id=$row[newsid]'>" . $row['headline'] . "</a></td><td width='90px'>" . $row['facebook'] . "</td><td width='90px'><a href='" . $row['twitter'] . "'class='twitter-share-button' data-lang='en'>Tweet</a></td></tr>";
}
echo "</table>";
mysql_close();
?>
I then want a left hand navigation list which populates from the below query
<?php
$query = "SELECT * FROM latestnews group by subject";
$result = mysql_query($query) or die(mysql_error());
while($row = mysql_fetch_array($result)){
$subject = $row['subject'];
echo $subject;
echo "<br />";
}?>
I basically need the links to update and only show the selected subject entries, but as I say I do not know what to try next.
Your help would be appreciated