The link is like this:
Expand|Select|Wrap|Line Numbers
- echo '<a href="delete.php">Delete</a>';
Expand|Select|Wrap|Line Numbers
- <?php
- include ('includes/DbCon.php');
- $query = 'SELECT headline, body, image, newsDate FROM news WHERE id = '. intval($_GET['$id']);
- $result = $mysqli->query ($query);
- while($row = $mysqli->fetch_array) {
- {
- echo "<table>";
- echo "<tr><td>";
- echo $row['headline'];
- echo "</td></tr>";
- echo "</td><td>";
- echo $row['body'];
- echo "</td><td>";
- echo $row['date'];
- echo "</td><td>";
- echo "<p><img src=".$dir.$row['image']." alt=''></p>";
- echo "</td></tr>";
- }
- echo "</table>";
- mysqli_close($mysqli);
- ?>