Mailformulier foutmelding in het engels
Ik heb een mailformulier gemaakt het werkt perfect maar als mensen de verplichte velden niet invullen krijg ik een Engelse foutmelding kan ik deze ook in het Nederlands krijgen. dus nu krijg ik :
The following error(s)occured:
-name is required
-telefoon is required
-From is required
Alvast bedankt
p.s. kan ik van dat from ook gewoon e-mail maken ??
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<?php
$mailto= "";
$subject= "Bericht van de contactpagina van Uw Bedrijf";
$from= "";
$footer= "";
$confpage= "bedankt.html";
$i=0;
if (!is_array($HTTP_POST_VARS))
return;
reset($HTTP_POST_VARS);
while(list($key, $val) = each($HTTP_POST_VARS)) {
$GLOBALS[$key] = $val;
$val=stripslashes($val);
$message = $message."$key = $val\n";
}
$message= "$message$footer";
mail( "$mailto", "$subject", "$message", "From: $from");
include($confpage);
?>
$mailto= "";
$subject= "Bericht van de contactpagina van Uw Bedrijf";
$from= "";
$footer= "";
$confpage= "bedankt.html";
$i=0;
if (!is_array($HTTP_POST_VARS))
return;
reset($HTTP_POST_VARS);
while(list($key, $val) = each($HTTP_POST_VARS)) {
$GLOBALS[$key] = $val;
$val=stripslashes($val);
$message = $message."$key = $val\n";
}
$message= "$message$footer";
mail( "$mailto", "$subject", "$message", "From: $from");
include($confpage);
?>
Gewijzigd op 17/01/2011 17:28:40 door Edor Stals
Laat relevante codes zien?
@Yea Rupie; neee, dat is raar. Codes zijn niet nodig om een probleem op te lossen! Het zou maar is moeten joh...
Maar ik denk dat je beter kunt kijken naar een nieuwer script want de rest zal er wel net zo erg aan toe zijn.
Toevoeging op 17/01/2011 17:46:49:
Er moet ergens in je complete code een stukje met Javascript alert staan. Is dit echt alles wat er bij hoort??
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<?php
$mailto= "";
$subject= "Bericht van de contactpagina van Uw Bedrijf";
$from= "";
$footer= "";
$confpage= "bedankt.html";
$i=0;
if (!is_array($HTTP_POST_VARS))
return;
reset($HTTP_POST_VARS);
while(list($key, $val) = each($HTTP_POST_VARS)) {
$GLOBALS[$key] = $val;
$val=stripslashes($val);
$message = $message."$key = $val\n";
}
$message= "$message$footer";
mail( "$mailto", "$subject", "$message", "From: $from");
include($confpage);
?>
$mailto= "";
$subject= "Bericht van de contactpagina van Uw Bedrijf";
$from= "";
$footer= "";
$confpage= "bedankt.html";
$i=0;
if (!is_array($HTTP_POST_VARS))
return;
reset($HTTP_POST_VARS);
while(list($key, $val) = each($HTTP_POST_VARS)) {
$GLOBALS[$key] = $val;
$val=stripslashes($val);
$message = $message."$key = $val\n";
}
$message= "$message$footer";
mail( "$mailto", "$subject", "$message", "From: $from");
include($confpage);
?>
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
<!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>
<title>Hendrikx minigraafwerken minigraafwerken.nl-contactpagina</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="description" content="Daar waar een schop niet toereikend is en traditionele graafmachines niet kunnen komen, kunnen wij onze minigraver inzetten.Door zijn bijzondere afmeting kan de machine door (binnen-!!) deuren en poorten van slechts 75 cm." />
<meta name="keywords" content="limburg, brabant, graafwerk, graafwerken, nederweert, weert, heythuysen, budel, someren, minigraver, sloopwerk, slopen, grondwerk, fundering, grondverzet, uitgraven, graafmachine, graszoden, afvoeren, afvoer, zand, grind, tuinaarde" />
<link href="../../css/theo.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="captcha-120.js"></script>
<script type="text/javascript">
<!--
function MM_validateForm() { //v4.0
if (document.getElementById){
var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=document.getElementById(args[i]);
if (val) { nm=val.name; if ((val=val.value)!="") {
if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
} else if (test!='R') { num = parseFloat(val);
if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
min=test.substring(8,p); max=test.substring(p+1);
if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
} } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is verplicht.\n'; }
} if (errors) alert('Devolgende fouten zijn opgetreden:\n'+errors);
document.MM_returnValue = (errors == '');
} }
//-->
</script>
</head>
<body onload="MM_preloadImages('../../image/button/home_over.png','../../image/button/introductie_over.png','../../image/button/grondwerk_over.png','../../image/button/sloopwerk_over.png','../../image/button/overige_over.png','../../image/button/contact_over.png')">
<div id="container">
<div id="top"></div>
<div id="menu"><table width="505" border="0" cellpadding="0">
<tr>
<th scope="row"> </th>
<td><a href="../../index.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Home','','../../image/button/home_over.png',1)"><img src="../../image/button/home.png" alt="Home" name="Home" width="39" height="10" border="0" id="Home" /></a></td>
<td><a href="../introductie/introductie.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Introductie','','../../image/button/introductie_over.png',1)"><img src="../../image/button/introductie.png" name="Introductie" width="77" height="10" border="0" id="Introductie" /></a></td>
<td><a href="../grondwerk/grondwerk.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Grondwerk','','../../image/button/grondwerk_over.png',1)"><img src="../../image/button/grondwerk.png" name="Grondwerk" width="76" height="10" border="0" id="Grondwerk" /></a></td>
<td><a href="../sloopwerk/sloopwerk.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Sloopwerk','','../../image/button/sloopwerk_over.png',1)"><img src="../../image/button/sloopwerk.png" name="Sloopwerk" width="73" height="12" border="0" id="Sloopwerk" /></a></td>
<td><a href="../overige/overige.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Overige','','../../image/button/overige_over.png',1)"><img src="../../image/button/overige.png" name="Overige" width="116" height="12" border="0" id="Overige" /></a></td>
<td><a href="contact.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Contact','','../../image/button/contact_over.png',1)"><img src="../../image/button/contact.png" name="Contact" width="60" height="10" border="0" id="Contact" /></a></td>
</tr>
</table>
</div>
<div id="topbalk"></div>
<div id="content"><div id="foto">
<div id="logo">
<p><img src="image/logo.png" width="250" height="20" /><br />
<br />
Karissteeg 16<br />
6031 PH Nederweert
<br />
Tel. 0495 - 663545<br />
Fax. 0495 - 663545<br />
GSM 06 - 50486648<br /><br />
<br />
<img src="image/kubota.png" width="250" height="269" /></p>
</div>
</div>
<div id="contactpage">
<p><img src="image/contact.png" width="143" height="27" alt="Contact" /></p><br />
<br />
<form action="sendmail.php" method="post" name="form1" id="form1" onsubmit="MM_validateForm('naam','','R','telefoon','','R','From','','RisEmail');return GoCaptchA();return document.MM_returnValue""MM_validateForm('telefoon','','RisNum','From','','RisEmail');return document.MM_returnValue" >
<table width="500" border="0" cellpadding="0" onfocus="MM_validateForm('naam','','R','telefoon','','R','From','','RisEmail');return document.MM_returnValue">
<tr>
<th width="23%" scope="row"><div align="right" onfocus="MM_validateForm('naam','','R','telefoon','','RisNum','from','','RisEmail');return document.MM_returnValue">
<h3>Naam</h3>
</div></th>
<td width="1%"><h4>:</h4></td>
<td width="76%"><input name="naam" type="text" id="naam" size="50" /></td>
</tr>
<tr>
<th scope="row"><div align="right">
<h3>Adres</h3>
</div></th>
<td><h4>:</h4></td>
<td><input name="adres" type="text" id="adres" size="50" /></td>
</tr>
<tr>
<th scope="row"><div align="right">
<h3>Woonplaats</h3>
</div></th>
<td><h4>:</h4></td>
<td><input name="woonplaats" type="text" id="woonplaats" size="50" /></td>
</tr>
<tr>
<th scope="row"><div align="right">
<h3>Postcode</h3>
</div></th>
<td><h4>:</h4></td>
<td><input name="postcode" type="text" id="postcode" onblur="MM_validateForm('naam','','R','from','','RisEmail');return document.MM_returnValue" size="10" maxlength="6" /></td>
</tr>
<tr>
<th scope="row"><div align="right">
<h3>Telefoon</h3>
</div></th>
<td><h4>:</h4></td>
<td><input name="telefoon" type="text" id="telefoon" onblur="MM_validateForm('naam','','R','from','','RisEmail');return document.MM_returnValue" size="50" maxlength="10" /></td>
</tr>
<tr>
<th scope="row"><div align="right">
<h3>E-mail</h3>
</div></th>
<td><h3>:</h3></td>
<td><input name="From" type="text" id="From" size="50" /></td>
</tr>
<tr>
<th scope="row"><div align="right">
<h3>Vraag</h3>
</div></th>
<td><h3>:</h3></td>
<td><textarea name="textfield2" cols="47" rows="6" id="textfield2"></textarea></td>
</tr>
<tr>
<th scope="row"><div align="right"></div></th>
<td> </td>
<td><script type="text/javascript">InitCaptchA()</script></td>
</tr>
<tr>
<th scope="row"><div align="right"></div></th>
<td> </td>
<td><input type="submit" name="button" id="button" value="Verzenden" /> <input type="reset" name="button2" id="button2" value="Annuleren" /></td>
</tr>
<tr>
<th scope="row"><div align="right"></div></th>
<td> </td>
<td> </td>
</tr>
</table>
</form><br /><br />
</div>
</div></div>
<div id="footer">Hendrikx minigraafwerken 2010 <a href="http://www.edorstals.nl" target="_blank">webdesign Edor Stals</a></div><br />
<!-- Begin JouwStats code-->
<script type = "text/javascript">
//<![CDATA[
var data, p, c;
var agt=navigator.userAgent.toLowerCase();
p='http';
c=((document.cookie) ? 'enabled' : 'disabled');
if((location.href.substr(0,6)=='https:')||(location.href.substr(0,6)=='HTTPS:')) {p='https';} data = '&r=' + escape(document.referrer) + '&n=' + escape(navigator.userAgent) + '&p=' + escape(navigator.userAgent)
if(navigator.userAgent.substring(0,1)>'3') {data = data + '&sd=' + screen.colorDepth + '&sw=' + escape(screen.width+ 'x'+screen.height) + '&c=' + escape(c)};
document.onload = document.write('<a href="http://www.jouwstats.nl/algemeen/27680" target="_blank" title="Jouwstats.nl - Statistieken teller!" >') +
document.write('<img border=0 hspace=0 '+'vspace=0 src="http://www.jouwstats.nl/counter.php?i=27680' + data + '"><\/a>');
//]]>
</script>
<!-- Einde JouwStats code-->
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Hendrikx minigraafwerken minigraafwerken.nl-contactpagina</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="description" content="Daar waar een schop niet toereikend is en traditionele graafmachines niet kunnen komen, kunnen wij onze minigraver inzetten.Door zijn bijzondere afmeting kan de machine door (binnen-!!) deuren en poorten van slechts 75 cm." />
<meta name="keywords" content="limburg, brabant, graafwerk, graafwerken, nederweert, weert, heythuysen, budel, someren, minigraver, sloopwerk, slopen, grondwerk, fundering, grondverzet, uitgraven, graafmachine, graszoden, afvoeren, afvoer, zand, grind, tuinaarde" />
<link href="../../css/theo.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="captcha-120.js"></script>
<script type="text/javascript">
<!--
function MM_validateForm() { //v4.0
if (document.getElementById){
var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=document.getElementById(args[i]);
if (val) { nm=val.name; if ((val=val.value)!="") {
if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
} else if (test!='R') { num = parseFloat(val);
if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
min=test.substring(8,p); max=test.substring(p+1);
if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
} } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is verplicht.\n'; }
} if (errors) alert('Devolgende fouten zijn opgetreden:\n'+errors);
document.MM_returnValue = (errors == '');
} }
//-->
</script>
</head>
<body onload="MM_preloadImages('../../image/button/home_over.png','../../image/button/introductie_over.png','../../image/button/grondwerk_over.png','../../image/button/sloopwerk_over.png','../../image/button/overige_over.png','../../image/button/contact_over.png')">
<div id="container">
<div id="top"></div>
<div id="menu"><table width="505" border="0" cellpadding="0">
<tr>
<th scope="row"> </th>
<td><a href="../../index.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Home','','../../image/button/home_over.png',1)"><img src="../../image/button/home.png" alt="Home" name="Home" width="39" height="10" border="0" id="Home" /></a></td>
<td><a href="../introductie/introductie.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Introductie','','../../image/button/introductie_over.png',1)"><img src="../../image/button/introductie.png" name="Introductie" width="77" height="10" border="0" id="Introductie" /></a></td>
<td><a href="../grondwerk/grondwerk.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Grondwerk','','../../image/button/grondwerk_over.png',1)"><img src="../../image/button/grondwerk.png" name="Grondwerk" width="76" height="10" border="0" id="Grondwerk" /></a></td>
<td><a href="../sloopwerk/sloopwerk.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Sloopwerk','','../../image/button/sloopwerk_over.png',1)"><img src="../../image/button/sloopwerk.png" name="Sloopwerk" width="73" height="12" border="0" id="Sloopwerk" /></a></td>
<td><a href="../overige/overige.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Overige','','../../image/button/overige_over.png',1)"><img src="../../image/button/overige.png" name="Overige" width="116" height="12" border="0" id="Overige" /></a></td>
<td><a href="contact.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Contact','','../../image/button/contact_over.png',1)"><img src="../../image/button/contact.png" name="Contact" width="60" height="10" border="0" id="Contact" /></a></td>
</tr>
</table>
</div>
<div id="topbalk"></div>
<div id="content"><div id="foto">
<div id="logo">
<p><img src="image/logo.png" width="250" height="20" /><br />
<br />
Karissteeg 16<br />
6031 PH Nederweert
<br />
Tel. 0495 - 663545<br />
Fax. 0495 - 663545<br />
GSM 06 - 50486648<br /><br />
<br />
<img src="image/kubota.png" width="250" height="269" /></p>
</div>
</div>
<div id="contactpage">
<p><img src="image/contact.png" width="143" height="27" alt="Contact" /></p><br />
<br />
<form action="sendmail.php" method="post" name="form1" id="form1" onsubmit="MM_validateForm('naam','','R','telefoon','','R','From','','RisEmail');return GoCaptchA();return document.MM_returnValue""MM_validateForm('telefoon','','RisNum','From','','RisEmail');return document.MM_returnValue" >
<table width="500" border="0" cellpadding="0" onfocus="MM_validateForm('naam','','R','telefoon','','R','From','','RisEmail');return document.MM_returnValue">
<tr>
<th width="23%" scope="row"><div align="right" onfocus="MM_validateForm('naam','','R','telefoon','','RisNum','from','','RisEmail');return document.MM_returnValue">
<h3>Naam</h3>
</div></th>
<td width="1%"><h4>:</h4></td>
<td width="76%"><input name="naam" type="text" id="naam" size="50" /></td>
</tr>
<tr>
<th scope="row"><div align="right">
<h3>Adres</h3>
</div></th>
<td><h4>:</h4></td>
<td><input name="adres" type="text" id="adres" size="50" /></td>
</tr>
<tr>
<th scope="row"><div align="right">
<h3>Woonplaats</h3>
</div></th>
<td><h4>:</h4></td>
<td><input name="woonplaats" type="text" id="woonplaats" size="50" /></td>
</tr>
<tr>
<th scope="row"><div align="right">
<h3>Postcode</h3>
</div></th>
<td><h4>:</h4></td>
<td><input name="postcode" type="text" id="postcode" onblur="MM_validateForm('naam','','R','from','','RisEmail');return document.MM_returnValue" size="10" maxlength="6" /></td>
</tr>
<tr>
<th scope="row"><div align="right">
<h3>Telefoon</h3>
</div></th>
<td><h4>:</h4></td>
<td><input name="telefoon" type="text" id="telefoon" onblur="MM_validateForm('naam','','R','from','','RisEmail');return document.MM_returnValue" size="50" maxlength="10" /></td>
</tr>
<tr>
<th scope="row"><div align="right">
<h3>E-mail</h3>
</div></th>
<td><h3>:</h3></td>
<td><input name="From" type="text" id="From" size="50" /></td>
</tr>
<tr>
<th scope="row"><div align="right">
<h3>Vraag</h3>
</div></th>
<td><h3>:</h3></td>
<td><textarea name="textfield2" cols="47" rows="6" id="textfield2"></textarea></td>
</tr>
<tr>
<th scope="row"><div align="right"></div></th>
<td> </td>
<td><script type="text/javascript">InitCaptchA()</script></td>
</tr>
<tr>
<th scope="row"><div align="right"></div></th>
<td> </td>
<td><input type="submit" name="button" id="button" value="Verzenden" /> <input type="reset" name="button2" id="button2" value="Annuleren" /></td>
</tr>
<tr>
<th scope="row"><div align="right"></div></th>
<td> </td>
<td> </td>
</tr>
</table>
</form><br /><br />
</div>
</div></div>
<div id="footer">Hendrikx minigraafwerken 2010 <a href="http://www.edorstals.nl" target="_blank">webdesign Edor Stals</a></div><br />
<!-- Begin JouwStats code-->
<script type = "text/javascript">
//<![CDATA[
var data, p, c;
var agt=navigator.userAgent.toLowerCase();
p='http';
c=((document.cookie) ? 'enabled' : 'disabled');
if((location.href.substr(0,6)=='https:')||(location.href.substr(0,6)=='HTTPS:')) {p='https';} data = '&r=' + escape(document.referrer) + '&n=' + escape(navigator.userAgent) + '&p=' + escape(navigator.userAgent)
if(navigator.userAgent.substring(0,1)>'3') {data = data + '&sd=' + screen.colorDepth + '&sw=' + escape(screen.width+ 'x'+screen.height) + '&c=' + escape(c)};
document.onload = document.write('<a href="http://www.jouwstats.nl/algemeen/27680" target="_blank" title="Jouwstats.nl - Statistieken teller!" >') +
document.write('<img border=0 hspace=0 '+'vspace=0 src="http://www.jouwstats.nl/counter.php?i=27680' + data + '"><\/a>');
//]]>
</script>
<!-- Einde JouwStats code-->
</body>
</html>
Gewijzigd op 17/01/2011 17:57:15 door Edor Stals
Je captcha slaat trouwens nergens op. Daar zullen spambots / kwaadwillende geen enkele moeite mee hebben.
Ik weet helaas geen tutorial uit het hoofd die uptodate is.
Toevoeging op 17/01/2011 17:53:47:
En de conf pagina van je mail? Haal daar even wachtwoorden/namen/berichten weg (niet zo op je server opslaan, gewoon kopieëren) en pm die eens naar mij, dan kijk ik daar even.
Toevoeging op 17/01/2011 17:55:10:
En het ziet er verouderd uit trouwens. met tabellen.
Toevoeging op 17/01/2011 19:53:04:
Geen reactie, tsss =p