You are probably looking for this:
<form action = "#" method = "POST">
<?php
$am=$_GET["am"];
$res=mysql_query("select * from blotterreport where subject like('$am%')");
echo "<table border="1">";
while ($row=mysql_fetch_array($res)) {
echo "<tr>";
echo "<td>"; echo $row["entrynumber"]; echo"</td>";
echo "<td>"; echo $row["natureofcase"]; echo"</td>";
echo "<td>"; echo $row["month"]; echo"</td>";
echo "<td>"; echo $row["subject"]; echo"</td>";
echo "<td>"; echo "<img src=view.png onclick= width=100% height=5%/>"; echo"</td>"; /**this is the undefined index**/
echo "<td>"; echo "<img src=edit.png onclick= width=100% height=5%/>"; echo"</td>"; /**this is the undefined index**/
echo "</tr>";
}
?>
</form>
The indexes of the row relate to the column names of your database table. I doubt you have a database column named "<image src=edit.png onclick= width=100% height=5%/>"
.
You do not need that many ‘echo’ commands.