%
strId = request("Id")
' Create a recordset object to store specific table information
Set conn = Server.CreateObject("ADODB.Recordset")
'Establish what records you want selected for the SQL query string
SQL = "Select * From Clients where AdId =" & strId
'Set the recordset object equal to the SQL query string
conn.Open SQL, objADO, 1, 3
strBannerName = conn("BannerName")
strCustomerEmail = conn("CustomerEmail")
strStartDate = conn("StartDate")
strImgUrl = conn("ImgUrl")
strLinkTo = conn("LinkTo")
strBannerName2 = request("BannerName")
if session("AccessLevel") = "1" then
strCustomerEmail2 = request("CustomerEmail")
else
strCustomerEmail2 = strCustomerEmail
end if
strStartDate2 = request("StartDate")
strImgUrl2 = request("ImgUrl")
strLinkTo2 = request("LinkTo")
strImpPur2 = request("cboImpPur")
If Request.form <> "" Then
if strBannerName2 = "" or strCustomerEmail2 = "" or strStartDate2 = "" or strImgUrl2 = "" or strLinkTo2 = "" then
strWarningErrMsg = "
All fields are required."
end if
if strWarningErrMsg = "" then
conn("BannerName") = strBannerName2
conn("CustomerEmail") = strCustomerEmail2
conn("StartDate") = strStartDate2
conn("ImgUrl") = strImgUrl2
conn("ImpPur") = strImpPur2
conn("LinkTo") = strLinkTo2
'conn("Sizeof1") = strSizeOf1
'conn("Sizeof2") = strSizeOf2
'conn("TextUnder") = strTextUnder
Conn.update
Response.Redirect "viewallbanners.asp?Id=" & conn("AdId")
end if
end if
%>
EDIT A BANNER - STEP 2
<% if strWarningErrMsg <> "" then %>
| Error(s):<%= strwarningErrMsg %> |
Fill out the following form to edit the selected banner.
All fields are required.