Hi all,
I wanted to add a check for the asp form I wrote to make sure that
people submit all the fields. This is what I have so far:
<%
DIM strName, strEmail
strName = Request.Form("Name")
strEmail = Request.Form("E-mail")
IF strName <> "" AND strEmail <> "" THEN
' Process the form as you like here
' For example enter form to your database or send it via email
ELSE
Response.Write "<p>Please click back on your browser and complete
the following fields:</p>"
IF strName <> "" THEN
ELSE
Response.Write "<b>• Name</b><br>"
END IF
IF strEmail <> "" THEN
ELSE
Response.Write "<b>• Email</b><br>"
END IF
END IF
%>
When I put it in my script, it doesn't work. Any ideas?
TIA,
Riva
Original script:
<%
body = "Subscriber Information:" & vbCrLf
'************************
'***Collect the values
'***in the form
'************************
For Each obj in request.form
if obj <> "" then
body = body & "<br><br>" & "<strong>" & obj & "</strong>: " &
request.form(obj)
else
Response.Write "<p>Please click back on your browser and complete all
the fields</p>"
end if
next
body = body & ""
'************************
'***Sends the Email
'************************
Dim objSendMail
Set objSendMail = Server.CreateObject("CDO.Message")
objSendMail.To ="[EMAIL PROTECTED]"
objSendMail.From ="[EMAIL PROTECTED]"
objSendMail.Subject = "New Newsletter Subscription"
objSendMail.HTMLBody = body
objSendMail.Send
Set objCDOMail = Nothing
response.redirect "http://www.reallygoodfreelancewriter.com/thankyou.htm"
%>
____ • The WDVL Discussion List from WDVL.COM • ____
To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED] or
use the web interface http://e-newsletters.internet.com/discussionlists.html/
Send Your Posts To: wdvltalk@lists.wdvl.com
To change subscription settings, add a password or view the web interface:
http://intm-dl.sparklist.com/read/?forum=wdvltalk
________________ http://www.wdvl.com _______________________
You are currently subscribed to wdvltalk as: archive@jab.org
To unsubscribe send a blank email to [EMAIL PROTECTED]
To unsubscribe via postal mail, please contact us at:
Jupitermedia Corp.
Attn: Discussion List Management
475 Park Avenue South
New York, NY 10016
Please include the email address which you have been contacted with.