Hi,
I have a page (index.php) , where I have a link as such:
$sql3 = "SELECT * FROM x_story ORDER BY id DESC limit 2";
$result7 = mysql_query($sql3);
while ($directory = mysql_fetch_array($result7)) {
$id = $directory['id'];
$title = $directory['title'];
$entry = $directory['entry'];
$date = $directory['date'];
$date2 = $directory['date2'];
echo "<a href=\"story.php?id=$id\" target=\"_blank\">$title</a><br>";
}
?>
And then on my story.php page I have this:
<?PHP
$result6 = mysql_query("SELECT * FROM x_story WHERE id = $id");
while ($directory = mysql_fetch_array($result6)) {
$id = $directory['id'];
$title = $directory['title'];
$entry = $directory['entry'];
$date = $directory['date'];
$date2 = $directory['date2'];
echo "<span class=\"tables\">Posted on $date, at $date2<br><br><b>$title</b><br><br>$entry</span>";
}
?>
NOW, I think this should work properly, except, no matter which link i click on (say i had 3 links) they all go to the same story, when they should be going to different stories, based on the id number right? WHAT am i doing wrong???
Thanks in advance for any help.