Reputation: 3
So here is my code:
$sql = "SELECT * FROM $tbl_name ORDER BY id DESC LIMIT $start, $limit";
$result = mysql_query($sql);
while ($row = mysql_fetch_array($result)) {
echo "<a href =\"vicevi.php?id=$row[id]\">".$row['Title'];"</a>";
echo "<br>";
echo nl2br($row["VicText"]);
echo "<hr>";
}
And I get the link vicevi.php?id=x
(x=any number) but it doesn't open specific id. Can anyone help me here?
Upvotes: 0
Views: 50
Reputation: 3815
echo "<a href =\"vicevi.php?id=".$row['id']."\>".$row['Title']."</a>";
Upvotes: 0
Reputation: 21522
echo "<a href =\"vicevi.php?id=" . $row["id"] . "\">".$row['Title'] . "</a>";
Besides the $row[id]
problem you had a ;
extra.
Upvotes: 1