Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!--#include file="includes/includes.inc.asp" -->
- <%
- 'SetVars("all")
- If Request.Form("f_cancel") = "Cancel" Then
- Response.Redirect("managecontacts.asp")
- End If
- If Request.Form("f_submit") = "Yes" Then
- strSQL = "delete agents where id = " & Request.Querystring("id")
- 'Response.Write(strSQL & "<br/>")
- objConn.Execute(strSQL)
- Response.Redirect("manageagents.asp")
- End If
- If Request.QueryString("id") = "" Then
- Response.Redirect("manageagents.asp")
- End If
- %>
- <!--#include file="includes/header.asp" -->
- <h1>Delete Agent</h1>
- <form method="post">
- <table class="table tall wide" cellspacing="0">
- <tr class="bluehead">
- <td>id</td>
- <td>Email</td>
- <td>Full Name</td>
- </tr>
- <%
- strSQL = "select * FROM agents where agents.id = " & Request.QueryString("id")
- objRS.Open strSQL, objConn
- Do While Not objRS.EOF
- Response.Write("<tr>")
- Response.Write("<td>" & objRS("id") & "</td>")
- Response.Write("<td>" & objRS("email") & "</td>")
- Response.Write("<td>" & objRS("first_name") &" "& objRS("middle_name") &" "& objRS("last_name") & "</td>")
- Response.Write("<input type=""hidden"" value=""" & objRS("id") &""" name=""id"" />" )
- Response.Write("</tr>")
- objRS.MoveNext
- Loop
- objRS.Close
- %>
- <tr>
- <td colspan="2">Are you sure you want to delete this agent?</td>
- </tr>
- <tr>
- <td><input type="hidden" name="id" value="<%=Request.QueryString("id") %>" /><input type="submit" name="f_submit" value="Yes" class="button" />
- <input type="submit" name="f_cancel" value="Cancel" class="button" /></td>
- </tr>
- </table>
- </form>
- <!--#include file="includes/footer.asp" -->
Add Comment
Please, Sign In to add comment