Well, I did that, but when I pressed submit it took me to the code page. showed the asp code. heres my code.. id ont know what im doing wrong..
heres the form code
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Contact Information</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
body {
font-family:Arial, Tahoma, sans-serif;
font-size:0.6em;
margin:35px;
color:#000000;}
label {
margin: 0;
margin-top:0.3em;
text-align:right;
width:70px;
float:left;
text-transform:uppercase;
}
fieldset {
background-color:#ffffff;
border:solid 1 #000; /* Opera doesn't get border:none or border:0 on fieldsets */
width:300px;
}
legend {
width:100px;
height:0px;
color:#000000;
font-size:2.5em;
padding-left:0em;
position:inherit;
top:-1.5em;
text-transform:uppercase;
font-weight:bold;
letter-spacing:-1px;
}
.br {display:none;}
.textfield {
font:1.1em Verdana, Arial, Helvetica, sans-serif ;
color:#000000;
margin:3px;
height:18px;
border:solid 1 #000000;
padding: 0px 0px;
width:200px;
width:187px;
}
fieldset>input.textfield {
}
textarea {
font:1.1em Verdana, Arial, Helvetica, sans-serif;
color:#000000 ;
margin:3px;
height:165px;
border:solid 1 #000000;
padding: 0 8px;
width:200px;
width:190px;
}
fieldset>textarea {
}
.submit {
margin:3px;
height:18px;
border:solid 1 #000000;
width:80px;
font:1.1em Verdana, Arial, Helvetica, sans-serif;
color:#000000 ;
text-transform:uppercase;
}
</style>
</head>
<body>
<form action="mail.asp" method="post">
<fieldset class="fieldset">
<legend>Contact Form</legend>
<label for="name">Name:</label><br class="nobr" />
<input name="name" type="text" class="textfield" id="name" />
<br />
<label for="email">Email:</label><br class="nobr" />
<input name="email" type="text" class="textfield" id="email" />
<br/>
<label for="phone">Phone:</label><br class="nobr" />
<input name="website" type="text" class="textfield" id="website" />
<br />
<label for="comment">Comment:</label><br class="nobr" />
<textarea cols="30" rows="15" name="comment" id="comment" class="textarea"></textarea>
<br />
<label for="submit"> </label><br class="nobr" />
<input name="submit" type="submit" class="submit" id="submit" value="submit" />
</fieldset>
</form>
</body>
</html>
heres the asp code
Code:
<%
' Website Contact Form Generator
' http://www.tele-pro.co.uk/scripts/contact_form/
' This script is free to use as long as you
' retain the credit link
' declare variables
Dim EmailFrom
Dim EmailTo
Dim Subject
Dim Name
Dim Tel
Dim Comment
' get posted data into variables
EmailFrom = Trim(Request.Form("email"))
EmailTo = "mst0ke@yahoo.com"
Subject = "yoursubject"
Name = Trim(Request.Form("name"))
Tel = Trim(Request.Form("tel"))
Comment = Trim(Request.Form("comment"))
' validation
Dim validationOK
validationOK=true
If (Trim(EmailFrom)="") Then validationOK=false
If (validationOK=false) Then Response.Redirect("error.htm?" & EmailFrom)
' prepare email body text
Dim Body
Body = Body & "Email From: " & EmailFrom & VbCrLf
Body = Body & "Name: " & Name & VbCrLf
Body = Body & "Telephone: " & Tel & VbCrLf
Body = Body & "Comment: " & Comment & VbCrLf
' send email
Dim mail
Set mail = Server.CreateObject("CDONTS.NewMail")
mail.To = EmailTo
mail.From = EmailFrom
mail.Subject = Subject
mail.Body = Body
mail.Send
' redirect to success page
Response.Redirect("ok.htm?" & EmailFrom)
%>