Hello Guys,
I am a newbie and have spent many hours searching on the net but have not been able to do it.
I am trying to create a link with a thumbnail image on (summary.php page). When the link is clicked, I want a new page (say detail.php) to open. However, the link is supposed to reveal more pictures and information. All the information sit on one table in the same database and I want a link from the summary.php page to reveal all the information on that same record on the other page (detail.php page). I do not know how to transfer the “id” to the detail page in order to specify in a query to reveal the whole information on the clicked image link.
Below is the query to display information on the summary page.
summary.php page
$sql = mysql_query(“SELECT * FROM classified”);
while($row = mysql_fetch_array($sql)){
echo “<table border = ‘1’>”;
echo “<tr>”;
$id = $row[‘id’];
echo “<td rowspan = ‘3’>” . ‘<a href = “details.php?id = $id” . “>”’ . “<img src ='” . $row[‘photo1small’] .“'” . “/>” . “</a>”. “</td>”;
echo “<td width = ‘300’>”. $row[‘title’] . “</td>”;
echo “<td width = ‘100’>”. $row[‘price’] . “</td>”;
echo “</tr>”;
echo “</table>”;
echo “<br/>”;
}
detail.php page
<?php
$id = $_GET[‘id’];
echo $id;
?>
Parse error: syntax error, unexpected ‘"’, expecting ‘,’ or ‘;’ in C:\wamp\www\showclassified.php on line 11
I keep getting errors like the one above and I would appreciate if someone could help me with this.
Thank you
Kofifred