currently the query goes:
on the home page click each news has a link as the following:
PHP Code:
<a href='news_read.php?id=$row[id]'> <img src=admin/mainnewsimg/".$row['photo'] ." alt='$title' width='125' height='85'> </a>
and on the news page where it displays the news:
PHP Code:
<?php
if(isset($_POST['submit']))
{
}
elseif(isset($_GET['id']))
{
$result = mysql_query("SELECT * FROM news WHERE id='$_GET[id]' ",$connect);
while($row = mysql_fetch_assoc($result))
{
$title = stripslashes($row["title"]);
$summary = stripslashes($row["summary"]);
$body = stripslashes(nl2br($row["body"]));
$date = $row['date'];
$pic = $row['photo'];
$id = $row['id'];
$date = date("d M Y");
}
}
?>
and to display the news:
PHP Code:
<?php
//display data
echo "<h1 class='headline_header_font'>".$title."</h1>";
echo "<h4 class='date'>$date</h4><hr>";
echo "<img src=admin/mainnewsimg/$pic alt='$summary' width='275' height='155' class='news_img'>";
echo "<p>$body</p>";
echo "<br>";
?>