根据php和sqlite中的数据库状态值导航到特定链接不起作用

when i clicked the link it does not redirect to the page that specified.i have the sqlite database and there is a database column for status(added,updated like wise).i want to redirect to the page when i clicked the status link in my link.php.Now Object not found error is getting.

this is my link.php code below.

Please can you help me guys.

<?php
// Includs database connection
include "db_connect.php";

// Makes query with rowid
$query = "SELECT rowid, * FROM registration";

// Run the query and set query result in $result
// Here $db comes from "db_connection.php"
$result = $db->query($query);

?>

<!DOCTYPE html>
<html>
<head>
    <title>Data List</title>
    <script>
function pop_up(url){
window.open(url,'win2','status=no,toolbar=no,scrollbars=yes,titlebar=no,menubar=no,resizable=yes,width=1076,height=768,directories=no,location=no') 
}
</script>
</head>
<body>
<br>
<br>

<!-- <a href="registration.php">Add New</a>-->
<table>
<tbody>

<tr>
<th style="">status</th>
<th style="">submitted</th>
<th style="">department</th>
<th style="">head</th>
<th style="">title</th>
<th style="">applicant</th>
<th style="">date</th>
</tr>
<?php while($row = $result->fetchArray()) {?>

<!--<tr class="table-row" data-href="update.php?id=<?php echo $row['rowid'];?>" data-target="_blank">-->
<tr>
<td>
<a href="update.php?id=<?php echo $row['rowid'];?>"></a>
</td>
<td><a href="<?php echo $row['rowid'];?>">view</a>
<?php
if ($row['rowid'] == "added"){
    echo "<a href='updated.php" . $row['submitted'] . "updated'>  </a>";

} else {
    echo "<a href='next.php" . $row['submitted'] . "next'>  </a>";
}
?>
</td>
<td><?php echo $row['status'];?></td>
<td><?php echo $row['submitted'];?></td>
<td><?php echo $row['department'];?></td>
<td><?php echo $row['head'];?></td>
<td><?php echo $row['title'];?></td>
<td><?php echo $row['applicant'];?></td>
<td><?php echo $row['date'];?></td>

</tr>
<?php } ?>
</tbody>
</table>
<script>
var tableRows = document.getElementsByClassName('table-row');

for (var i = 0, ln = tableRows.length; i < ln; i++) {
  tableRows[i].addEventListener('click', function() {
    window.open(this.getAttribute('data-href'), this.getAttribute('data-target'));
  });
}

</script>
<br>
<br>
</body>
</html>