OK TOLD YOU I WOULD GET A PROBLEM WITH THIS DAM EMAIL THING. THIS IS WHAT WORKS, EVERYTHING BUT THE EMAILING PART. I'M KIND OF NEW AT THIS BUT BEAR WITH ME PLZ.
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>WELCOME TO THE REGISTRATION FORM</title>
</head>
<body background="REGISTRATIONBACKG.jpg">
<%
'------------------this is an if statment for postback--------------------
val = request.form("val")
if val = "" then
'-----------------this is the form--------------------------------------
%>
<form method="POST" action="Hunt_Registration.asp">
<p><img border="0" src="HUNTER%20REGISTRATIONPIC.gif" width="334" height="16"></p>
<p>HUNTER ID &n bsp;
<input type="text" name="Hunt_Id" size="20"> <img border="0" src="deergun.gif" width="147" height="60"></p>
<p>
HUNTER PASSWORD <input type="text" name="Hunt_Password" size="20"></p>
<p>FIRST NAME
<input type="text" name="Hunt_First_Name" size="20"> </p>
<p> LAST
NAME
<input type="text" name="Hunt_Last_Name" size="20"></p>
<p>COUNTRY
<input type="text" name="Hunt_Country" size="20"> </p>
<p>
PROVINCE &n bsp;
<input type="text" name="Hunt_Province" size="20"></p>
<p>STATE &n bsp;
<input type="text" name="Hunt_State" size="20"></p>
<p>City &nb sp;
<input type="text" name="Hunt_City" size="20"></p>
<p>Street
Name
<input type="text" name="Hunt_Street_Name" size="20"></p>
<p>Street
Number
<input type="text" name="Hunt_Street_Num" size="20"></p>
<p>Apartment Number <input type="text" name="Hunt_Appt_Num" size="20"></p>
<p>Postal
Code
<input type="text" name="Hunt_Postal" size="20"></p>
<p>Zip
Code
<input type="text" name="Hunt_zip" size="20"></p>
<p>Telephone Number <input type="text" name="Hunt_Telephone_Num" size="20"></p>
<p>WHAT IS YOUR FAVORITE ANIMAL TO HUNT <select size="1" name="FAV_HUNT">
<option>GOOSE</option>
<option>DUCK</option>
<option>DEER</option>
<option>MOOSE</option>
<option>BEAR</option>
<option>TURKEY</option>
</select></p>
<p>EMAIL &n bsp;
<input type="text" name="Hunt_Email" size="20"></p>
<p><input type="submit" value="Submit" name="Submit"></p>
</form>
</body>
</html>
<%
'----------------if the form has been submitted to its self then run this code-------------------
else
'--------------------request the form elements and write to variables----------------------
Hunt_First_Name = Request.Form("Hunt_First_Name")
Hunt_Email = Request.Form("Hunt_Email")
Dim ObjMail
'-------------------setup the CDONTS email object-------------------------------------
Set ObjMail = Server.CreateObject("CDONTS.NewMail")
'------------------------Set the email elements------------------------------
ObjMail.To = ""& Hunt_Email &""
ObjMail.CC = ""& Hunt_Email &""
ObjMail.From = "NorthshoreAdventures@sympatico.com"
ObjMail.Subject = "You have registered"
thebody = "Name:"& Hunt_First_Name&"" & vbcrlf
'----------------create the body of the message------------------------
thebody = thebody & "Email: "& Hunt_Email &"" & vbclf
thebody = thebody & "Subject: "& Hunt_First_Name &""
ObjMail.Body = thebody
'----------------------send the message-----------------------------------
ObjMail.Send
Set ObjMail = Nothing
'---------------------insert the information into the database------------------------
' it connects to my registration asp to insert into database or should
'----------------------end if the if statement----------------------------
end if
%>



Reply With Quote
Bookmarks