I'm trying to make it so when i click a "x" it will delete the entire row. I've linked each record to my jobRef however the delete isn't working.
This is what i've got so far;
<?php
$status = 'available';
$stmt = $pdo->query('SELECT * FROM jobs WHERE jobStatus = "' . $status . '"');
$results = $stmt->fetchAll();
echo "<table><tr><td>Job Reference</td><td>Description</td>";
foreach ($results as $row) {
echo "<tr><td>".$row['jobRef']."</td>","<td>".$row['jobDescription']."</td>";
echo "<td><a href='edit.php?id=".$row['jobRef']."'>Edit</a></td>";
?>
Heres my delete.php
<?php
require 'mysqlcon.php';
?>
<?php
if(isset($_GET['id']))
{
$id=$_GET['id'];
$query1= ("DELETE FROM person WHERE id='$id'");
if($query1)
{
header('location:Vacancies.php');
}
}
?>