PDA

View Full Version : ASP email form prosessing


dhummelen
05-04-2009, 09:27 PM
He,
I got no clue about ASP and how to make it work. I've convertet a PHP script to ASP but it doesn't work. Here's the ASP code;

<%
Dim gv_emailSubject, gv_webMaster, gv_naamField, gv__POST()

php
gv_emailSubject = "Contact"
gv_webMaster = "info@lonnekekokenopmaat.nl"
gv_naamField = gv__POST("naam")
$onderwerpField = $_POST["onderwerp"]
$emailField = $_POST["email"]
$berichtField = $_POST["bericht"]
$body = <<<EOD
<br><hr><br>
Naam: $naamField<br>
Onderwerp: $onderwerpField <br>
Email: $emailField<br>
Bericht: $berichtField<br>
EOD
$headers = "From: " & $emailField & "\r\n"
$headers = $headers & "Content-type: text/html\r\n"
$success = mail($webMaster, $emailSubject, $body, $headers)
$theResults = <<<EOD
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>lonneke ten hooven - koken op maat</title>
<link href="css/main.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="wrapper">
<div id="sidebar"> <a href="index.html"><img src="_media/logoKokenOpMaat.gif" width="345" height="110" alt="Logo Lonneke ten Hooven Koken op Maat" /></a><img src="_media/sidebarContact.jpg" width="345" height="600" alt="koken op locatie" />
</div>
<div id="header">
<ul>
<li><a href="koken_op_maat/koken_op_maat.html">koken op maat</a></li>
<li><a href="thema_menu/thema_menu.html">thema menus</a></li>
<li><a href="work_shops/work_shops.html">work <br/> shops</a></li>
<li><a href="patisserie/patisserie.html">patisserie</a></li>
</ul>
</div>
<div id="mainContent">
<h1>Contact</h1>
<p>&nbsp
/p><p>Bedank voor uw bericht.</p><p>&nbsp;</p></div><div id="footer"><ul><li>Telefoon:+31(0)622555877<a href="mailto:info@lonnekekokenopmaat.nl">info@lonnekekokenopmaat.nl</a><a href="contact.html">contact</a></li></ul></div></div></body></html>EOD;Response.Write "" & $theResults & ""

%>

It's just for sending a contact form to a email adress. here's the form online. (http://dhummelen.terminalcare.net/test/contact.html) I hope someone would like to help me with this.
Tanks alot

Old Pedant
05-04-2009, 09:33 PM
Ummm...no, that is *NOT* ASP code.

That is PHP code.

The first two lines start out to be ASP code, but after that there is nothing AT ALL related to ASP in there.

If the PHP script works, why not just go back to using PHP??

dhummelen
05-04-2009, 09:36 PM
I just find out that ASP doesn't work on the testing server, but only on the final server. I just tested it with a localhost program(MAMP) on my mac but still no good results. So does MAMP suport ASP?

dhummelen
05-04-2009, 09:37 PM
Ummm...no, that is *NOT* ASP code.

That is PHP code.

The first two lines start out to be ASP code, but after that there is nothing AT ALL related to ASP in there.

If the PHP script works, why not just go back to using PHP??
It doesnt suport PHP

Old Pedant
05-04-2009, 10:31 PM
Mac's do NOT support ASP.

ASP only works on Windows machines using the IIS web server. (And Sun has a now obsolete version of ASP that runs on some Linux machines, but it's no longer actively supported.)