
here is the screen shot of my database! i have successfully done the insert and delete action
however i have problem in viewing individual records
when i click view on id #45 all the details will display including the second row! here is the screen shot of the result

as you can see in the result the detail in 2nd row appear! i want to display only the details of the row that i clicked!
i would ask assistance from you expert
here is my view.php code
<?php
require 'database.php';
$query = "SELECT id, date, po FROM sales";
$result = $mysqli->query($query) or die(mysqli_error($mysqli));
if ($result) {
echo "<table cellspacing='0' cellpadding='15' border='0'>
<th >Date</th><th >PONumber</th>";
while ($row = $result->fetch_object()) {
$po = $row->po;
$date = $row->date;
$id = $row->id;
echo "<tr>
<td>$date</td> <td >$po</td></tr>";
}
}
?>
Your php code is looping through all rows returned by $query. Your query probably has a bad where clause
Edit for your Edit: