I am generating a link based on the id from a mysql db
Code: Select all
<A HREF="moredata.php?moredata=<? echo $myid ?>"><? echo $rowї'title']; ?></A><BR>Code: Select all
<?php
$link = mysql_connect("local", "user", "pass");
if (!$link) {
print "Error connecting to database";
exit;
}
if (!@mysql_select_db("engrooved")) {
print "Could not select Database";
exit;
}
$id = (int) $_GETї'myid'];
$result = mysql_query("select * from knowledge where id=$id");
if ($result && @mysql_num_rows($result) > 0 ) {
while ($row = mysql_fetch_array($result))
{
$text .= $rowї'title'];
$text .= "<br><br>";
$text .= $rowї'author'];
$text .= "<br><br>";
$text .= $rowї'body'];
echo $text;
}
}
?>But for some reason the data does not display
I don't know what I am doing wrong
any help would be appreciated
Cheers