Hey!
To cut a long story short I had a PHP form, but the client has a windows server, so i had to re-code it to ASP, i havent used asp before, but i made a form and it worked well, i was testing it on godaddy, but then uploaded it all again and now the form doesnt work
Here is the ASP file:
Code:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
Option Explicit
Response.Expires = 0
Dim strName
Dim strAddress
Dim strPostcode
Dim strPhone
Dim strMobile
Dim strEmail
Dim strHelp
Dim strMore
strName = Trim(Request.Form("name"))
strAddress = Trim(Request.Form("address"))
strPostcode = Trim(Request.Form("postcode"))
strPhone = Trim(Request.Form("phone"))
strMobile = Trim(Request.Form("mobile"))
strEmail = Trim(Request.Form("email"))
strHelp = Trim(Request.Form("help"))
strMore = Trim(Request.Form("more"))
Dim objMyMail1, msgBody, msgSubject
Set objMymail1 = Server.CreateObject("CDONTS.NewMail")
Dim strResponse
strResponse = "Response from my site"
msgSubject = strResponse
msgBody ="<html>"
msgBody = msgBody & "<head>"
msgBody = msgBody & "<title>Help Request Form</title>"
msgBody = msgBody & "<style type='text/css'>"
msgBody = msgBody & "<!--"
msgBody = msgBody & "p { font-family: Arial, Helvetica, sans-serif; font-size: 75%; color: #333333;}"
msgBody = msgBody & "-->"
msgBody = msgBody & "</style>"
msgBody = msgBody & "</head>"
msgBody = msgBody & "<body>"
msgBody = msgBody & "<p>This is a response From ********</p>"
msgBody = msgBody & "<p>Name: "
msgBody = msgBody & strName
msgBody = msgBody & "</p>"
msgBody = msgBody & "<p>Address: "
msgBody = msgBody & strAddress
msgBody = msgBody & "</p>"
msgBody = msgBody & "<p>Postcode: "
msgBody = msgBody & strPostcode
msgBody = msgBody & "</p>"
msgBody = msgBody & "<p>Phone: "
msgBody = msgBody & strPhone
msgBody = msgBody & "</p>"
msgBody = msgBody & "<p>Mobile: "
msgBody = msgBody & strMobile
msgBody = msgBody & "</p>"
msgBody = msgBody & "<p>Email:<br>"
msgBody = msgBody & strEmail
msgBody = msgBody & "</p>"
msgBody = msgBody & "<p>Help:<br>"
msgBody = msgBody & strHelp
msgBody = msgBody & "</p>"
msgBody = msgBody & "<p>More:<br>"
msgBody = msgBody & strMore
msgBody = msgBody & "</p>"
msgBody = msgBody & "</body></html>"
objMyMail1.From = strEmail
objMyMail1.To = "myemail@mail.com"
objMyMail1.Subject = msgSubject
objMyMail1.BodyFormat = 0
objMymail1.MailFormat = 0
objMyMail1.Body = msgBody
objMyMail1.Send
Set objMyMail1 = Nothing
%>
<html>
<head>
<title>Thank You</title>
<style type="text/css">
<!--
p { font-family: Arial, Helvetica, sans-serif; font-size: 95%; color: #333333;}
-->
</style>
</head>
<body>
<div id="mail">
<p> <br><br>
<center>
Thank you
<BR><BR>
<a href="javascript:window.close();"><u>Click here To Close This Window</u></a>
</p>
</body></html>
and here is the form html code:
HTML Code:
<form action='mail.asp' method='post'>
Name (optional): <input type='text' name='name' size=35><br><br>
Address (optional): <input type='text' name='address' size=35><br><br>
Postcode (optional): <input type='text' name='postcode' size=35><br><br>
Telephone Number (optional): <input type='text' name='phone' size=35><br><br>
Mobile Telephone Number (optional): <input type='text' name='mobile' size=35><br><br>
Email Address (optional): <input type='text' name='email' size=35><br><br>
How can I help?<BR>
<SELECT NAME="help" SIZE="1">
<OPTION SELECTED>- Please Select One -
<OPTION>Anti Social Behaviour
<OPTION>Drugs
<OPTION>Bullying
<OPTION>Weapons
<OPTION>Hate Crime
<OPTION>Other
</SELECT>
</P>
<BR><BR>
<FONT
color="6d1b67" size="2" font face="arial">
<B>Please Type Your Message Below (you MUST fill in this section): </b>
<BR>
<textarea name='more' ROWS=6 COLS=30></textarea><br>
<BR>
<input type='submit' value='Send'>
</form>
I cant understand what i have done, if someone can point me in the right direction, or tell me what I have done wrong I would be so grateful
Thanks

|