Blog.php?act=view&id=6 <-- this one shows individual post
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\wamp\www\supp\b-class.php on line 17
Here is the code for that part
Code: Select all
//view the news article!
if(isset($_GET['act']) && $_GET['act'] == "view")
{
$id = $_GET['id'];
$sql = mysql_query("SELECT * FROM content WHERE index = '$id'");
while($row = mysql_fetch_array($sql))
{
echo "<div id='post'>";
echo "<h3>" . $row['title'] . "</h3>";
echo '<a href="blog.php?act=view&id='.$row['index'].'">'.$row['title'].'</a>';
echo $row['news'];
echo '<p class="postend">Posted by: '.$row['author'].' | Date:'.$row['date'].'</p></div>';
}