<% Option Explicit dim txtNameVal dim txtEMailVal dim txtError dim bError dim sFile Dim xADO dim xRS dim sSqlStmt %> <% ' If first call display form if request.form("txtName").count = 0 then if request.querystring("NancyDelId").count = 0 then ' First time in call DisplayForm("","","") else ' Calling delete call DelEmail(cint(request.querystring("NancyDelId"))) end if else bError = False txtNameVal = request.form("txtName") txtEMailVal = request.form("txtEMail") txtError = "" ' Check for Admin if CheckAdmin then ' Admin user display list of addresses call ShowList else ' Check Name has been completed if txtNameVal = "" then bError = True txtError = "You must complete your Name." else ' Check E-Mail is valid if not(ValidEMail(txtEMailVal)) then bError = True txtError = "Invalid E-Mail address." end if end if if bError then call DisplayForm(txtNameVal, txtEMailVal, txtError) else ' All Ok do update call AddEMail(txtNameVal, txtEMailVal) end if end if End If %>