Het werkt wel.. alleen snap niet dat ik dubbele melding krijg, postcode verstuurd hij niet mee..
En hallo alles goed plakt hij de naam eraan vast.
hallo alles goed?naam:
adres:
postcode: (werktniet)
woonplaats:
telefoon:
from:
subject: grare
message:
adres:
postcode:
woonplaats:
telefoon:
from:
subject:
<form action="mailer.php" method="post" name="form1" id="form1" style="margin:0px; font-family:Georgia, 'Times New Roman', Times, serif; font-size:11px; width:300px;" onsubmit="MM_validateForm('from','','RisEmail','subject','','R','verif_box','','R','message','','R');return document.MM_returnValue">
<p>Uw e-mail adres:<br />
<input name="from" type="text" id="from" style="padding:2px; border:1px solid #CCCCCC; width:180px; height:14px; font-family:Verdana, Arial, Helvetica, sans-serif;font-size:11px;" value="<?php echo $_GET['from'];?>"/>
<br />
</p>
<p> </p>
<p>Naam:<br />
<input name="naam" type="text" id="from" style="padding:2px; border:1px solid #CCCCCC; width:180px; height:14px; font-family:Verdana, Arial, Helvetica, sans-serif;font-size:11px;" value="<?php echo $_GET['from'];?>"/> </p>
<p>Adres:<br />
<input name="adres" type="text" id="from" style="padding:2px; border:1px solid #CCCCCC; width:180px; height:14px; font-family:Verdana, Arial, Helvetica, sans-serif;font-size:11px;" value="<?php echo $_GET['from'];?>"/> </p>
<p>Postcode:<br />
<input name="name" type="text" id="from" style="padding:2px; border:1px solid #CCCCCC; width:180px; height:14px; font-family:Verdana, Arial, Helvetica, sans-serif;font-size:11px;" value="<?php echo $_GET['from'];?>"/> </p>
<p>Woonplaats::<br />
<input name="woonplaats" type="text" id="from" style="padding:2px; border:1px solid #CCCCCC; width:180px; height:14px; font-family:Verdana, Arial, Helvetica, sans-serif;font-size:11px;" value="<?php echo $_GET['from'];?>"/> </p>
<p>Telefoon:<br />
<input name="telefoon" type="text" id="from" style="padding:2px; border:1px solid #CCCCCC; width:180px; height:14px; font-family:Verdana, Arial, Helvetica, sans-serif;font-size:11px;" value="<?php echo $_GET['from'];?>"/> </p>
<p>Onderwerp:<br />
<input name="subject" type="text" id="subject" style="padding:2px; border:1px solid #CCCCCC; width:180px; height:14px;font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px;" value="<?php echo $_GET['subject'];?>"/>
<br />
<br />
Typ verification image:<br />
<input name="verif_box" type="text" id="verif_box" style="padding:2px; border:1px solid #CCCCCC; width:180px; height:14px;font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px;"/>
<img src="verificationimage.php?<?php echo rand(0,9999);?>" alt="verification image, type it in the box" width="50" height="24" align="absbottom" /><br />
<br />
<!-- if the variable "wrong_code" is sent from previous page then display the error field -->
<?php if(isset($_GET['Verkeerde code'])){?>
</p>
<div style="border:1px solid #990000; background-color:#D70000; color:#FFFFFF; padding:4px; padding-left:6px;width:295px;">verkeerde verification code</div><br />
<?php ;}?>Bericht:<br />
<textarea name="message" cols="6" rows="5" id="message" style="padding:2px; border:1px solid #CCCCCC; width:300px; height:100px; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px;"><?php echo $_GET['message'];?></textarea>
<noscript><a href="http://8888888888888" style="display:none;">contact form by 8888888888</a></noscript>
<input name="Submit" type="submit" style="margin-top:10px; display:block; border:1px solid #000000; width:100px; height:20px;font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px; padding-left:2px; padding-right:2px; padding-top:0px; padding-bottom:2px; line-height:14px; background-color:#EFEFEF;" value="Bericht verzenden"/>
</form> Mailer.php
<?php
// -----------------------------------------
// The Web Help .com
// -----------------------------------------
// remember to replace [email protected] with your own email address lower in this code.
// load the variables form address bar
$name= $_POST["naam"];
$adres= $_POST["adres"];
$postcode= $_POST["postcode"];
$woonplaats= $_POST["woonplaats"];
$telefoon= $_POST["telefoon"];
$from = $_POST["from"];
$message = $_POST["message"];
$subject = $_POST["subject"];
$verif_box = $_POST["verif_box"];
// remove the backslashes that normally appears when entering " or '
$message .= 'naam: ' . $name . "\n\n";
$message .= 'adres: ' . $adres . "\n\n";
$message .= 'postcode: ' . $postcode . "\n\n";
$message .= 'woonplaats: ' . $woonplaats . "\n\n";
$message .= 'telefoon: ' . $telefoon . "\n\n";
$message .= 'from: ' . $from . "\n\n";
$message .= 'subject: ' . $subject . "\n\n";
$message .= 'message: ' . $message . "\n\n";
// check to see if verificaton code was correct
if(md5($verif_box).'a4xn' == $_COOKIE['tntcon']){
// if verification code was correct send the message and show this page
mail("info@888888", 'Online Form: '.$subject, $_SERVER['REMOTE_ADDR']."\n\n".$message, "From: $from");
// delete the cookie so it cannot sent again by refreshing this page
setcookie('tntcon','');
} else if(isset($message) and $message!=""){
// if verification code was incorrect then return to contact page and show error
header("Location: index.php?subject=$subject&from=$from&message=$message&wrong_code=true");
exit;
} else {
echo "U heeft iets niet correct ingevuld! probeer het nog eens.";
exit;
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>E-Mail Sent</title>
<style type="text/css">
<!--
body,td,th {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
color: #D6D6D6;
}
body {
background-color: #FFF;
font-family: Georgia, "Times New Roman", Times, serif;
color: #FFF;
font-size: 14px;
font-weight: bold;
}
body {
color: #414141;
background-image: url(../kontakt/bedankt.png);
background-repeat: no-repeat;
}
p {
font-weight: normal;
font-size: 12px;
}
-->
</style></head>
<body>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p>Uw email is verzonden. Bedankt!<br />
<br />
Ga terug naar <a href="../"></a></p>
</body>
</html>