I have the following code for displaying results in a table. I am in need of a bit of help taking the ID from Tickets table and using it on the end of the hyperlink e.g. ".php?id=7" I have been reading tutorials on this however things dont seem to be happening for me. Thanks in advance.
<table class="table">
<tbody><tr><th>ID</th><th>Site Name</th><th>Title</th><th>Description</th><th>Quick Description</th><th>Contact</th><th>Status</th></tr>
<?php
$con = mysqli_connect(*credentials*);
if (!$con)
{
die('Could not connect: ' . mysqli_error());
}
$result = mysqli_query($con, "SELECT * FROM Tickets WHERE Status='Open' AND Active='active'");
while($row = mysqli_fetch_array($result))
{
echo "<tr>";
echo "<td><a href='//PHP/displayticket.php?id=$ID'>" . $row['ID'] . "</a></td>";
echo "<td>" . $row['SiteName'] . "</td>";
echo "<td>" . $row['Title'] . "</td>";
echo "<td>" . $row['Description'] . "</td>";
echo "<td>" . $row['quickdesc'] . "</td>";
echo "<td>" . $row['Contact'] . "</td>";
echo "<td>" . $row['Status'] . "</td>";
echo "</tr>";
}
echo "</table>";
mysqli_close($con);
?>