Hi ive got checkbox options going to a page and then being listed, i now want to delete what has been selected, im guessing this needs to be done through some kind of loop?
the code i have so far on the delete page is as follows :
the last line lists what has been selected.
please could you suggest how to implement aloop into the delete and if this should work or not?
kind regards jason
the code i have so far on the delete page is as follows :
Code:
<%
Dim flight_id
flight_id = Request.Form("flight_id")
if flight_id="" then
Response.Write "You did not select a name to delete!"
Else
SQL="DELETE * FROM tbl_flight_details WHERE flight_id ='" & flight_id
Set MyConn=Server.CreateObject("ADODB.Connection")
MyConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\inetpub\wwwroot\ddwassignment3\airlines.mdb"
Set MyRS=Server.CreateObject("ADODB.RecordSet")
MyRS.Open SQL,MyConn
end if
%>
</p>
<table width="37%" border="0" align="center">
<tr>
<td align="center"><% Response.Write("<font face=Calibri>You have deleted flight number <B><font face=Calibri color=Red>" & flight_id)%>
please could you suggest how to implement aloop into the delete and if this should work or not?
kind regards jason
Comment