reactiescript
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:
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<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>
<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
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<?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>
// -----------------------------------------
// 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>
Je hebt geen input met de naam postcode.
Je gebruikt dezelfde variabele dubbel en ook hoef je geen extra variabelen aan te maken voor de $_POST, bv:
Warning: Header may not contain more than a single header, new line detected. in /home/../domains/../public_html/kontakt/mailer.php on line 27
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
?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
$message = 'naam: ' . $_POST['name'] . "\n\n";
$message = 'adres: ' . $_POST['adres'] . "\n\n";
$message = 'postcode: ' . $_POST['postcode'] . "\n\n";
$message = 'woonplaats: ' . $_POST['woonplaats'] . "\n\n";
$message = 'telefoon: ' . $_POST['telefoon'] . "\n\n";
$message = 'from: ' . $_POST['from'] . "\n\n";
$message = 'message: ' . $_POST['message'] . "\n\n";
$message = 'subject: ' . $_POST['subject'] . "\n\n";
$message = 'virif_box: ' . $_POST['virif_box'] . "\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@", '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;
}
?>
// -----------------------------------------
// The Web Help .com
// -----------------------------------------
// remember to replace [email protected] with your own email address lower in this code.
// load the variables form address bar
$message = 'naam: ' . $_POST['name'] . "\n\n";
$message = 'adres: ' . $_POST['adres'] . "\n\n";
$message = 'postcode: ' . $_POST['postcode'] . "\n\n";
$message = 'woonplaats: ' . $_POST['woonplaats'] . "\n\n";
$message = 'telefoon: ' . $_POST['telefoon'] . "\n\n";
$message = 'from: ' . $_POST['from'] . "\n\n";
$message = 'message: ' . $_POST['message'] . "\n\n";
$message = 'subject: ' . $_POST['subject'] . "\n\n";
$message = 'virif_box: ' . $_POST['virif_box'] . "\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@", '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="../">F.nl</a></p>
</body>
</html>[/ code]
Uhm, jawel..
Mag niet.
mailer.php
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php
$message = 'naam: ' . $_POST['name'] . "\n\n";
$message = 'adres: ' . $_POST['adres'] . "\n\n";
$message = 'postcode: ' . $_POST['postcode'] . "\n\n";
$message = 'woonplaats: ' . $_POST['woonplaats'] . "\n\n";
$message = 'telefoon: ' . $_POST['telefoon'] . "\n\n";
$message = 'from: ' . $_POST['from'] . "\n\n";
$message = 'message: ' . $_POST['message'] . "\n\n";
$message = 'subject: ' . $_POST['subject'] . "\n\n";
$message = 'virif_box: ' . $_POST['virif_box'] . "\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@..........", '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;
}
?>
// 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@.....", '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;
}
?>
$message = 'naam: ' . $_POST['name'] . "\n\n";
$message = 'adres: ' . $_POST['adres'] . "\n\n";
$message = 'postcode: ' . $_POST['postcode'] . "\n\n";
$message = 'woonplaats: ' . $_POST['woonplaats'] . "\n\n";
$message = 'telefoon: ' . $_POST['telefoon'] . "\n\n";
$message = 'from: ' . $_POST['from'] . "\n\n";
$message = 'message: ' . $_POST['message'] . "\n\n";
$message = 'subject: ' . $_POST['subject'] . "\n\n";
$message = 'virif_box: ' . $_POST['virif_box'] . "\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@..........", '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;
}
?>
// 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@.....", '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">
<!--
Gewijzigd op 06/12/2011 11:35:10 door - Ariën -
Alleen de eerste keer = daarna .=