Alright, this is my first post... And I am a PHP Noob...here it goes:
Here is an example of something similar using a parts inventory theme and a checkbox.
echo "<form method=\"post\" action=\"delform.php\">
<h4>Item List:</h4> <table border=\"1\" cellpadding=\"2\"> <tr>
<th align=\"center\">Item</th>
<th align=\"center\">Description</th>
<th align=\"center\">Owner</th>
<th align=\"center\">Delete</th>
</tr>";
while (odbc_fetch_ROW($result1)) {
$item1=odbc_result($result1,"productcode");
$desc1=odbc_result($result1,"DESCRIPTION");
$own1=odbc_result($result1,"OWNER");
echo "<tr>
<td align=\"center\">$item1</td>
<td align=\"center\">$desc1</td>
<td align=\"center\">$own1</td>
<td align=\"center\"><div align =\"center\"><input type=\"checkbox\" name=\"Delete[]\" value=\"$item1\">
</td></tr>";
}
echo "<tr>
<td align=\"center\"></td>
<td align=\"center\"></td>
<td align=\"center\"></td>
<td align=\"center\" table border=\"0\" cellpadding=\"2\"></select> <input type =\"submit\" name =\"submit\" value=\"Delete!\"> </form> </div></td>
</tr>
</table>";
If you don't want a check box use a hidden form field as suggested above by djheru:
echo "<input type=\"hidden\" name=\"photoid\" value=\"$photoid\">";