I’m trying to make it so that when a users clicks one of the rows,it will take them to a new page whose link is given as the value of the row they selected and then retrieve the value with $_GET[“timesub”].
Anyone know how to do this?
mysql_select_db("RRRC", $con);
$result = mysql_query("SELECT * FROM mainreq WHERE roomnum=$loc");
echo "<table border='1'>
<tr>
<th> Submitted </th>
</tr>";
while($row = mysql_fetch_array($result))
{
echo "<tr>";
echo "<td><a href="roomdata.php?timestamp= . $row['timesub'] . "> . $row['timesub'] . </a></td>";
echo "</tr>";
}
echo "</table>";
Assuming that $row[‘timesub’] identifies a row in your data set (I doubt it), just fix your echo instruction as:
Escaping the html quotes properly.