<% if request.querystring("form")="filled" then
call ThankYou
else
call ShowForm
end if
%>
<% sub ShowForm %>
<% end sub %>
<%sub ThankYou%>
<%
' Below I am reading in the values from my form
Fname = request.form("Fname")
Lname = request.form("Lname")
Email = request.form("Email")
Phone = request.form("Phone")
Fax = request.form("Fax")
add1 = request.form("add1")
add2 = request.form("add2")
city = request.form("city")
state = request.form("state")
zip = request.form("zip")
receivemail = request.form("receivemail")
comments = request.form("comments")
%>
Thank you for filling up our contact form!
We will get back to you as soon as possible
<%
body = "a user Just filled out the form " & vbcrlf &vbcrlf
body = body & "Name:" & Fname & " " & Lname &vbcrlf &vbcrlf
body = body & "Email:" & Email &vbcrlf &vbcrlf
body = body & "Phone:" & Phone &vbcrlf &vbcrlf
body = body & "Fax:" & Fax &vbcrlf &vbcrlf
body = body & "Address:" & add1 &vbcrlf &vbcrlf & add2 &vbcrlf &vbcrlf
body = body & city & " " & state & " "
body = body & zip &vbcrlf &vbcrlf &vbcrlf
body = body & "receivemail:" & receivemail &vbcrlf &vbcrlf
body = body & "Comments:" & Comments &vbcrlf &vbcrlf
dim sendmail
set sendmail = server.createobject("CDONTS.NewMail")
sendmail.send "lasqar@hotmail.com" , "lasqar@hotmail.com" , "the form filled" , body
%>
<% end sub %>