Sorry, but I'm brand new at this! I'm trying to let the user delete a row of information. I'm wondering if I'm associating the ID field with the DeleteId checkbox correctly. Do I need to index the table, or am I writing the SQL wrong? I do not get a syntax error, it simply doesn't delete. Any help would appreciated!
Thanks!
<!---part of a form that displays query results with a checkbox at the end of table data--->
<form name="delete" action="delete.cfm" method="post">
<cfoutput query="show_prop">
<tr>
<td nowrap>#type_of_furniture#</td>
<td width="20%" align=center>#property_number#</td>
<td align=center>#date_received#</td>
<td align=center>#serial_number#</td>
<td width="50%" align=center>#description#</td>
<td>
<input type="checkbox" name="DeleteID" value="#id#">
</td>
</tr>
</cfoutput>
</table>
<input type="submit" Value="Delete Record">
</form>
<!--- delete.cfm --->
<CFIF IsDefined("form.delete"
>
<CFQUERY datasource="surplus" name="show_prop">
DELETE FROM Surplus_Property
WHERE ID = '#form.DeleteID#'
</CFQUERY>
</CFIF>
Thanks!
<!---part of a form that displays query results with a checkbox at the end of table data--->
<form name="delete" action="delete.cfm" method="post">
<cfoutput query="show_prop">
<tr>
<td nowrap>#type_of_furniture#</td>
<td width="20%" align=center>#property_number#</td>
<td align=center>#date_received#</td>
<td align=center>#serial_number#</td>
<td width="50%" align=center>#description#</td>
<td>
<input type="checkbox" name="DeleteID" value="#id#">
</td>
</tr>
</cfoutput>
</table>
<input type="submit" Value="Delete Record">
</form>
<!--- delete.cfm --->
<CFIF IsDefined("form.delete"
<CFQUERY datasource="surplus" name="show_prop">
DELETE FROM Surplus_Property
WHERE ID = '#form.DeleteID#'
</CFQUERY>
</CFIF>