Hi, am developing a searchable online mysql database which is accessed through php.
I can search the database to produce results.
I want to display short results, then have a 'more info' link which will lead to more detailed info.
I dont know how to use php / mysql to carry the id from the first results page and link it to the details of the second results page.
At the moment I have:
$result2 = mysql_query("SELECT catdesc, g.catid FROM def_cats AS d, cats AS g
WHERE g.catid = d.catid AND g.id = ".$r["id"]."
ORDER BY catdesc
")
or die ("Error - ".mysql_error()."");
while($r2=mysql_fetch_array($result2))
{ $catdesc=$r2["catdesc"];
echo "<font face=Arial, Helvetica, sans-serif size=2>$catdesc <br>";
}
echo"<td valign=top align=left width=140><font face=Arial, Helvetica, sans-serif size=2><img src='$image' width='100'><br>";
echo "<a href='searchprojMI.php'>More project info</a></td>";
This leads to another similar PHP page but it is not linked to the item the more info button relates to.
How do I link them?
Any advice much appreciated.