OK, sorry for that first message. How about this:

<%
dim allIn
allIn = true
dim errorMsg
errorMsg = ""

DIM strName, strEmail, body

'************************
'***Collect the values
'***in the form
'************************

For Each obj in request.form
        if request.form(obj) <> "" then
                body = body & "<br><br>" & "<strong>" & obj &
"</strong>: " & 
                request.form(obj)
        else
                allIn = false
        end if
next


if allIn then
    strName = Request.Form("Name")
    strEmail = Request.Form("E-mail")

        body = "Subscriber Information:" & vbCrLf & body
        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"; 
else
        errorMsg = "Please enter:"
        errorMsg = errorMsg & "<ul>"
        for each obj in request.Form()
        errorMsg = errorMsg & "<li>" & obj & "</li>"
        next
        errorMsg = errorMsg & "</ul>"
end if
%>

Somewhere on the form page, drop in a response.write(errorMsg). If this
is the first time the user is hitting the page, errorMsg will have no
value, so nothing will appear. If the user has submitted the form
without one of the required values, errorMsg should have some the
appropriate text in it.

Mark

____ • 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.

Reply via email to