I've written a form in html(uses Java) that creates a mail (html) via a php file.

For me everyting works fine, but when certain users click the send button, the form blinks and empty all fields. But other users get a confirmation mail. How is this possible?

In a way I think it has something to do with the e.g. firewall, because in my php-file I send a copy to the user.

I've attached the generator file (bestellijst.php).

Please advice,
Best regards from Belgium!

Attachments
<?php 
session_start();
if( isset($_POST['submit'])) {
   if( $_SESSION['security_code'] == $_POST['security_code'] && !empty($_SESSION['security_code'] ) ) {
$bericht .= "<html>";
$bericht .= "<head>";
$bericht .= "<title></title>";
$bericht .= "</head>";
$bericht .= "<BODY bgproperties=fixed bgcolor=#FFFFFF>";
$bericht .= "<hr>";
$bericht .= "<table border=0>";
$bericht .= "<tr><td width=100>Naam</td><td><b>&nbsp;$naam</b></td></tr>";
$bericht .= "<tr><td width=100>Bedrijf</td><td><b>&nbsp;$bedrijf</b></td></tr>";
$bericht .= "<tr><td width=100>Adres</td><td><b>&nbsp;$adres</b></td></tr>";
$bericht .= "<tr><td width=100>Postcode</td><td><b>&nbsp;$postcode</b></td></tr>";
$bericht .= "<tr><td width=100>Plaats</td><td><b>&nbsp;$plaats</b></td></tr>";
$bericht .= "<tr><td width=100>Telefoon</td><td><b>&nbsp;$telnr</b></td></tr>";
$bericht .= "<tr><td width=100>E-mail</td><td><b>&nbsp;$mailadres</b></td></tr>";
$bericht .= "</table>";
$bericht .= "<hr>";
$bericht .= "<table border=1>";
$bericht .= "<tr><td><b>Artikel</b></td><td><b>Aantal</b></td><td><b>Prijs</b></td></tr>";
$bericht .= "<tr><td>PensCompl</td><td><b>$pensaantal</b></td><td>$penstotaal</td></tr>";
$bericht .= "<tr><td>VleesCompl</td><td><b>$vleesaantal</b></td><td>$vleestotaal</td></tr>";
$bericht .= "<tr><td>LamRBrok-2.5kg</td><td><b>$lam2aantal</b></td><td>$lam2totaal</td></tr>";
$bericht .= "<tr><td>LamRBrok-5kg</td><td><b>$lam5aantal</b></td><td>$lam5totaal</td></tr>";
$bericht .= "<tr><td>LamRBrok-10kg</td><td><b>$lam10aantal</b></td><td>$lam10totaal</td></tr>";
$bericht .= "<tr><td>LamRBrok-15kg</td><td><b>$lam15aantal</b></td><td>$lam15totaal</td></tr>";
$bericht .= "<tr><td>PupBrok-2.5kg</td><td><b>$pup2aantal</b></td><td>$pup2totaal</td></tr>";
$bericht .= "<tr><td>PupBrok-5kg</td><td><b>$pup5aantal</b></td><td>$pup5totaal</td></tr>";
$bericht .= "<tr><td>PupBrok-10kg</td><td><b>$pup10aantal</b></td><td>$pup10totaal</td></tr>";
$bericht .= "<tr><td>PupMix-2.5kg</td><td><b>$pupmix2aantal</b></td><td>$pupmix2totaal</td></tr>";
$bericht .= "<tr><td>PupMix-5kg</td><td><b>$pupmix5aantal</b></td><td>$pupmix5totaal</td></tr>";
$bericht .= "<tr><td>PupMix-10kg</td><td><b>$pupmix10aantal</b></td><td>$pupmix10totaal</td></tr>";
$bericht .= "<tr><td>JunBrok-2.5kg</td><td><b>$junior2aantal</b></td><td>$junior2totaal</td></tr>";
$bericht .= "<tr><td>JunBrok-5kg</td><td><b>$junior5aantal</b></td><td>$junior5totaal</td></tr>";
$bericht .= "<tr><td>JunBrok-10kg</td><td><b>$junior10aantal</b></td><td>$junior10totaal</td></tr>";
$bericht .= "<tr><td>JarcoMix-2.5kg</td><td><b>$mix2aantal</b></td><td>$mix2totaal</td></tr>";
$bericht .= "<tr><td>JarcoMix-5kg</td><td><b>$mix5aantal</b></td><td>$mix5totaal</td></tr>";
$bericht .= "<tr><td>JarcoMix-10kg</td><td><b>$mix10aantal</b></td><td>$mix10totaal</td></tr>";
$bericht .= "<tr><td>JarcoBrok-2.5kg</td><td><b>$brok2aantal</b></td><td>$brok2totaal</td></tr>";
$bericht .= "<tr><td>JarcoBrok-5kg</td><td><b>$brok5aantal</b></td><td>$brok5totaal</td></tr>";
$bericht .= "<tr><td>JarcoBrok-10kg</td><td><b>$brok10aantal</b></td><td>$brok10totaal</td></tr>";
$bericht .= "<tr><td>JarcoBrok-15kg</td><td><b>$brok15aantal</b></td><td>$brok15totaal</td></tr>";
$bericht .= "<tr><td>ExcelBrok-2.5kg</td><td><b>$excel2aantal</b></td><td>$excel2totaal</td></tr>";
$bericht .= "<tr><td>ExcelBrok-5kg</td><td><b>$excel5aantal</b></td><td>$excel5totaal</td></tr>";
$bericht .= "<tr><td>ExcelBrok-15kg</td><td><b>$excel15aantal</b></td><td>$excel15totaal</td></tr>";
$bericht .= "<tr><td>HARbrok-2.5kg</td><td><b>$har2aantal</b></td><td>$har2totaal</td></tr>";
$bericht .= "<tr><td>HARbrok-5kg</td><td><b>$har5aantal	</b></td><td>$har5totaal</td></tr>";
$bericht .= "<tr><td>HARbrok-15kg</td><td><b>$har15aantal</b></td><td>$har15totaal</td></tr>";
$bericht .= "<tr><td>SenBrok-2.5kg</td><td><b>$senior2aantal</b></td><td>$senior2totaal</td></tr>";
$bericht .= "<tr><td>SenBrok-5kg</td><td><b>$senior5aantal</b></td><td>$senior5totaal</td></tr>";
$bericht .= "<tr><td>SenBrok-15kg</td><td><b>$senior15aantal</b></td><td>$senior15totaal</td></tr>";
$bericht .= "<tr><td>SenMix-2.5kg</td><td><b>$smix2aantal</b></td><td>$smix2totaal</td></tr>";
$bericht .= "<tr><td>SenMix-5kg</td><td><b>$smix5aantal</b></td><td>$smix5totaal</td></tr>";
$bericht .= "<tr><td>SenMix-10kg</td><td><b>$smix10aantal</b></td><td>$smix10totaal</td></tr>";
$bericht .= "<tr><td>VegaBrok-2.5kg</td><td><b>$vega2aantal</b></td><td>$vega2totaal</td></tr>";
$bericht .= "<tr><td>VegaBrok-5kg</td><td><b>$vega5aantal</b></td><td>$vega5totaal</td></tr>";
$bericht .= "<tr><td>VegaBrok-10kg</td><td><b>$vega10aantal</b></td><td>$vega10totaal</td></tr>";
$bericht .= "<tr><td>VegaMix-2.5kg</td><td><b>$vmix2aantal</b></td><td>$vmix2totaal</td></tr>";
$bericht .= "<tr><td>VegaMix-5kg</td><td><b>$vmix5aantal</b></td><td>$vmix5totaal</td></tr>";
$bericht .= "<tr><td>VegaMix-10kg</td><td><b>$vmix10aantal</b></td><td>$vmix10totaal</td></tr>";
$bericht .= "<tr><td>KalkRBrok-2.5kg</td><td><b>$kal2aantal</b></td><td>$kal2totaal</td></tr>";
$bericht .= "<tr><td>KalkRBrok-5kg</td><td><b>$kal5aantal</b></td><td>$kal5totaal</td></tr>";
$bericht .= "<tr><td>KalkRBrok-15kg</td><td><b>$kal15aantal</b></td><td>$kal15totaal</td></tr>";
$bericht .= "<tr><td>BasisMix-2.5kg</td><td><b>$bas2aantal</b></td><td>$bas2totaal</td></tr>";
$bericht .= "<tr><td>BasisMix-5kg</td><td><b>$bas5aantal</b></td><td>$bas5totaal</td></tr>";
$bericht .= "<tr><td>BasisMix-10kg</td><td><b>$bas10aantal</b></td><td>$bas10totaal</td></tr>";
$bericht .= "<tr><td>RijstMix-2.5kg</td><td><b>$rijst2aantal</b></td><td>$rijst2totaal</td></tr>";
$bericht .= "<tr><td>RijstMix-5kg</td><td><b>$rijst5aantal</b></td><td>$rijst5totaal</td></tr>";
$bericht .= "<tr><td>RijstMix-10kg</td><td><b>$rijst10aantal</b></td><td>$rijst10totaal</td></tr>";
$bericht .= "<tr><td>CastrBrok-2.5kg</td><td><b>$cas2aantal</b></td><td>$cas2totaal</td></tr>";
$bericht .= "<tr><td>CastrBrok-5 kg</td><td><b>$cas5aantal</b></td><td>$cas5totaal</td></tr>";
$bericht .= "<tr><td>CastrBrok-15kg</td><td><b>$cas15aantal</b></td><td>$cas15totaal</td></tr>";
$bericht .= "<tr><td>LamRijstKoekjes-1kg</td><td><b>$lr1aantal</b></td><td>$lr1totaal</td></tr>";
$bericht .= "<tr><td>RundVet-600gram</td><td><b>$vet600aantal</b></td><td>$vet600totaal</td></tr>";
$bericht .= "<tr><td>RundVet-2kg</td><td><b>$vet2aantal</b></td><td>$vet2totaal</td></tr>";
$bericht .= "<tr><td>Karoteen-800gram</td><td><b>$teen800aantal</b></td><td>$teen800totaal</td></tr>";
$bericht .= "<tr><td>Puppy Mel-3kg</td><td><b>$mel3aantal</b></td><td>$mel3totaal</td></tr>";
$bericht .= "<tr><td>DogLovers-2.5kg</td><td><b>$dog2aantal</b></td><td>$dog2totaal</td></tr>";
$bericht .= "<tr><td>DogLovers-5kg</td><td><b>$dog5aantal</b></td><td>$dog5totaal</td></tr>";
$bericht .= "<tr><td>DogLovers-15kg</td><td><b>$dog15aantal</b></td><td>$dog15totaal</td></tr>";
$bericht .= "<tr><td>Carnibest-1kg</td><td><b>$carni1aantal</b></td><td>$carni1totaal</td></tr>";
$bericht .= "</table>";
$bericht .= "<hr>";
$bericht .= "TE VOLDOEN (EUR) <b>$allestotaal</b>";
$bericht .= "<hr>";
$bericht .= "<table border=0>";
$bericht .= "<tr><td width=100> Aanvulling</td><td><b>&nbsp; $opm</b></td></tr>";
$bericht .= "</table>";
$bericht .= "<hr>";
$bericht .= "</body>";
$bericht .= "</html>";
$header .= "From: $naam <$mailadres>\r\n";
$header .= "Reply-To: $mailadres\r\n"; 
$header .= "MIME-Version: 1.0\r\n"; 
$header .= "Content-Type: text/html; charset=iso-8859-1\r\n"; 
$header .= "X-Priority: 3\r\n"; 
$header .= "X-MSMail-Priority: Normal\r\n"; 
$header .= "X-Mailer: PHP / ".phpversion()."\r\n"; 
$to = "angelo.wieland@telenet.be";
$subject = "BESTELLING via de DogsCare Website..."; 
$bericht = wordwrap($bericht, 996);
mail($to, $subject, "$bericht", $header);
mail($mailadres, $subject, "$bericht", $header);

unset($_SESSION['security_code']);
header('Location: bedankt_bestellijst.htm');
   } else {
		// Insert your code for showing an error message here

		header('Location: bestellijst.htm');
   }
} else {
?>
	// <form action="form.php" method="post">
	// 	<label for="name">Name: </label><input type="text" name="name" id="name" /><br />
	// 	<label for="email">Email: </label><input type="text" name="email" id="email" /><br />
	// 	<label for="message">Message: </label><textarea rows="5" cols="30" name="message" id="message"></textarea><br />
	// 	<img src="CaptchaSecurityImages.php?width=100&height=40&characters=5" /><br />
	// 	<label for="security_code">Security Code: </label><input id="security_code" name="security_code" type="text" /><br />
	// 	<input type="submit" name="submit" value="Submit" />
	// </form>

<?php
	}
?>

Looking at your script.
There are a few minor edits to prevent some php warning and errors.

First, $header starts off as

$header .= "From: $naam <$mailadres>\r\n";

try changing it to

$header  = "From: $naam <$mailadres>\r\n";

I am not seeing how the script fetches the variabels for the email. I am surprises all emails are not having empty values.

Is this the only php script used to send the email? If so, where is the code that sets the variables being used in the email?

Looking at the script, I would have to say maybe the security_code is failing somehow. Without seeing the complete scritps together it is a little difficult for me to help. Perhaps someone else may be of more help than me.

I'm sorry, I couldn't attached the other file (html is not being accepted as attachment). So I've pasted it below:

<HTML lang=nl>

<HEAD> 
<base target="_self">
	<TITLE> DogsCare </TITLE>

<link rel="stylesheet" type="text/css" href="main.css">
<script language="JavaScript" src="gen_validatorv31.js" type="text/javascript"></script>

</HEAD>

<BODY bgproperties=fixed bgcolor="#CCCCCC">

<script LANGUAGE="JavaScript">
<!--
function calcTotal() {
var pens_val;
var vlees_val;
var prijs_pens_val;
var prijs_vlees_val;
var totaal_val;

if(theForm.pensaantal.value>=30) 
{
		prijs_pens_val=1.25;
		lbl_pens.innerText='zakjes van 500 gram x EUR 1,25 = ';
	} else {
		prijs_pens_val=1.4;
		lbl_pens.innerText='zakjes van 500 gram x EUR 1,40 = ';
} 

if(theForm.vleesaantal.value>=30) 
{
		prijs_vlees_val=1.25;
		lbl_vlees.innerText='zakjes van 500 gram x EUR 1,25 = ';
	} else {
		prijs_vlees_val=1.4;
		lbl_vlees.innerText='zakjes van 500 gram x EUR 1,40 = ';
} 

// AHV
pens_val = theForm.pensaantal.value * prijs_pens_val;
vlees_val = theForm.vleesaantal.value * prijs_vlees_val;

pens_val = pens_val.toFixed(2); 
vlees_val= vlees_val.toFixed(2); 

theForm.penstotaal.value = pens_val;
theForm.vleestotaal.value = vlees_val;

// LamRijst
var prijs_lam2_val;
var prijs_lam5_val;
var prijs_lam10_val;
var prijs_lam15_val;
var lam2_val;
var lam5_val;
var lam10_val;
var lam15_val;

prijs_lam2_val=11.25;
prijs_lam5_val=22.5;
prijs_lam10_val=36.5;
prijs_lam15_val=55;

lam2_val=theForm.lam2aantal.value*prijs_lam2_val;
lam5_val=theForm.lam5aantal.value*prijs_lam5_val;
lam10_val=theForm.lam10aantal.value*prijs_lam10_val;
lam15_val=theForm.lam15aantal.value*prijs_lam15_val;

lam2_val=lam2_val.toFixed(2);
lam5_val=lam5_val.toFixed(2);
lam10_val=lam10_val.toFixed(2);
lam15_val=lam15_val.toFixed(2);

theForm.lam2totaal.value=lam2_val;
theForm.lam5totaal.value=lam5_val;
theForm.lam10totaal.value=lam10_val;
theForm.lam15totaal.value=lam15_val;

// PupBrok
var prijs_pup2_val;
var prijs_pup5_val;
var prijs_pup10_val;
var pup2_val;
var pup5_val;
var pup10_val;

prijs_pup2_val=9;
prijs_pup5_val=18;
prijs_pup10_val=32.75;

pup2_val = theForm.pup2aantal.value * prijs_pup2_val;
pup5_val = theForm.pup5aantal.value * prijs_pup5_val;
pup10_val = theForm.pup10aantal.value * prijs_pup10_val;

pup2_val = pup2_val.toFixed(2);
pup5_val = pup5_val.toFixed(2);
pup10_val = pup10_val.toFixed(2);

theForm.pup2totaal.value = pup2_val;
theForm.pup5totaal.value = pup5_val;
theForm.pup10totaal.value = pup10_val;

[B]ETCETERA...[/B]

// TOTAAL
totaal_val = eval(pens_val)
           + eval(vlees_val)
	   + eval(lam2_val)
	   + eval(lam5_val)
	   + eval(lam10_val)
	   + eval(lam15_val)
	   + eval(pup2_val)
	   + eval(pup5_val)
	   + eval(pup10_val)
	   + eval(pupmix2_val)
	   + eval(pupmix5_val)
	   + eval(pupmix10_val)
	   + eval(junior2_val)
	   + eval(junior5_val)
	   + eval(junior10_val)
	   + eval(mix2_val)
	   + eval(mix5_val)
	   + eval(mix10_val)
	   + eval(brok2_val)
	   + eval(brok5_val)
	   + eval(brok10_val)
	   + eval(brok15_val)
	   + eval(excel2_val)
	   + eval(excel5_val)
	   + eval(excel15_val)
	   + eval(har2_val)
	   + eval(har5_val)
	   + eval(har15_val)
	   + eval(senior2_val)
	   + eval(senior5_val)
	   + eval(senior15_val)
	   + eval(smix2_val)
	   + eval(smix5_val)
	   + eval(smix10_val)
	   + eval(vega2_val)
	   + eval(vega5_val)
	   + eval(vega10_val)
	   + eval(vmix2_val)
	   + eval(vmix5_val)
	   + eval(vmix10_val)
	   + eval(kal2_val)
	   + eval(kal5_val)
	   + eval(kal15_val)
	   + eval(bas2_val)
	   + eval(bas5_val)
	   + eval(bas10_val)
	   + eval(rijst2_val)
	   + eval(rijst5_val)
	   + eval(rijst10_val)
	   + eval(cas2_val)
	   + eval(cas5_val)
	   + eval(cas15_val)
	   + eval(lr1_val)
	   + eval(vet600_val)
	   + eval(vet2_val)
	   + eval(teen800_val)
	   + eval(mel3_val)
	   + eval(dog2_val)
	   + eval(dog5_val)
	   + eval(dog15_val)
	   + eval(carni1_val);

theForm.allestotaal.value = totaal_val.toFixed(2);
}

-->
 </script>





<center>

<br>

<table border=0 cellspacing=1 width=95%>
<tr>
	<td>

	<font color=#333333><b> Online Bestellen</b></font> <br><br>

	<b>LET OP</b> In verband met werkzaamheden aan deze website, kan het voorkomen dat u na het klikken op de bestelknop een leeg formulier te zien krijgt en geen bevestiging van uw bestellen. U kunt dan het beste via e-mail of telefonisch bestellen. <br><br>
	<hr>
	
	Op onderstaand formulier kunt u uw bestelling invullen. <br><br>

	Wanneer u op de bestelknop klikt, ontvangt u automatisch een kopie van uw bestelling. Verzending van uw bestelling volgt als wij de storting van het totaalbedrag
	op onze bankrekeningnummer 47.81.12.556 ontvangen hebben. <br><br>
	
        Al onze producten worden <b>GRATIS BIJ U THUISBEZORGD</b> in <b>heel Zeeland</b> (met uitzondering van Zeeuws-Vlaanderen). Onze producten worden <u>niet per post</u> verzonden.

	<form method=post action="bestellijst.php" name="theForm">

	<table width=90% border=0 cellpadding=0 cellspacing=0>
       	<tr height=30> 
        		<td width=250> 	Naam 	</td>
		<td>	<input type="text" name="naam" size=50 value="" class=iveld_n>  	</td>
	</tr>
       	<tr height=30> 
        		<td> 	Bedrijfsnaam (indien van toepassing) 	</td>
		<td>	<input type="text" name="bedrijf" size=50 value="" class=iveld_n>   		</td>
	</tr>
       	<tr height=30> 
        		<td>	Adres (straat + nummer) 		</td>
		<td>	<input type="text" name="adres" size=50 value="" class=iveld_n>  		</td>
	</tr>
       	<tr height=30> 
        		<td>	Postcode 		</td>
		<td>	<input type="text" name="postcode" size=50 value="" class=iveld_n>  	</td>
	</tr>
       	<tr height=30> 
        		<td>	Woonplaats 		</td>
		<td>	<input type="text" name="plaats" size=50 value="" class=iveld_n>  	</td>
	</tr>
	<tr height=30>
        		<td> 	Telefoonnummer 		</td>
		<td>	<input type="text" name="telnr" size=50 value="" class=iveld_n> 		</td>
	</tr>
	<tr height=30> 
        		<td>	E-mail 			</td>
		<td>	<input type="text" name="mailadres" size=50 value="" class=iveld_n> 	</td>
	</tr>
	</table>

	<br><br>

	<table border=0 cellpadding=0 cellspacing=0>
	<tr height=30>
        	<td width=250>	<b>AHV Vers Vlees</b>		</td>
		<td width=250> &nbsp;
		</td>
		<td width=50> &nbsp;
		</td>
	</tr>	<tr height=30>
        	<td width=250>	Vlees Pens Compleet		</td>
		<td width=250>	<input type="text" style="text-align:right" name="pensaantal" size=2 value="0" class=iveld_n onChange="javascript:calcTotal()">
				<span id="lbl_pens"> zakjes van 500 gram x EUR 1,40 = </span>
		</td>
		<td width=50>	<input type="text" style="text-align:right" name="penstotaal" size=5 value="0.00" class=iveld_n readonly="1">
		</td>
	</tr>
	<tr height=30> 
        	<td>		Vlees Compleet		</td>
		<td>		<input type="text" style="text-align:right" name="vleesaantal" size=2 value="0" class=iveld_n onChange="javascript:calcTotal()">

				<span id="lbl_vlees"> zakjes van 500 gram x EUR 1,40 = </span>
		</td>
		<td>		<input type="text" style="text-align:right" name="vleestotaal" size=5 value="0.00" class=iveld_n readonly="1">  	</td>
	</tr>
<tr height=5><td><hr></td><td><hr></td><td><hr></td></tr>
	<tr height=30>
        	<td width=250> &nbsp; </td>
		<td width=250> &nbsp; </td>
		<td width=50>  &nbsp; </td>
	</tr>
	<tr height=30>
        	<td width=250>	<b>Jarco</b>		</td>
		<td width=250> &nbsp;
		</td>
		<td width=50> &nbsp;
		</td>
	</tr>
	<tr height=30>
        	<td width=250>	Lam/Rijst Brok		</td>
		<td width=250>	<input type="text" style="text-align:right" name="lam2aantal" size=2 value="0" class=iveld_n onChange="javascript:calcTotal()">
				<span id="lbl_lam2"> x 2,5 kg (EUR 11,25) </span>
		</td>
		<td width=50>	<input type="text" style="text-align:right" name="lam2totaal" size=5 value="0.00" class=iveld_n readonly="1">
		</td>
	</tr>
	<tr height=30>
        	<td width=250>	&nbsp;		</td>
		<td width=250>	<input type="text" style="text-align:right" name="lam5aantal" size=2 value="0" class=iveld_n onChange="javascript:calcTotal()">
				<span id="lbl_lam5"> x 5 kg (EUR 22,50) </span>
		</td>
		<td width=50>	<input type="text" style="text-align:right" name="lam5totaal" size=5 value="0.00" class=iveld_n readonly="1">
		</td>
	</tr>
	<tr height=30>
        	<td>		&nbsp;		</td>
		<td>		<input type="text" style="text-align:right" name="lam10aantal" size=2 value="0" class=iveld_n onChange="javascript:calcTotal()">

				<span id="lbl_lam10"> x 10 kg (EUR 36,50) </span>
		</td>
		<td>		<input type="text" style="text-align:right" name="lam10totaal" size=5 value="0.00" class=iveld_n readonly="1">  	</td>
	</tr>
	<tr height=30>
        	<td>		&nbsp;		</td>
		<td>		<input type="text" style="text-align:right" name="lam15aantal" size=2 value="0" class=iveld_n onChange="javascript:calcTotal()">

				<span id="lbl_lam15"> x 15 kg (EUR 55,00) </span>
		</td>
		<td>		<input type="text" style="text-align:right" name="lam15totaal" size=5 value="0.00" class=iveld_n readonly="1">  	</td>
	</tr>

[B]ETCETERA...[/B]

	<tr height=10>
        		<td>		&nbsp;		</td>
		<td align=right>	&nbsp; </td>
		<td>		-------------  +	</td>
	</tr>
	<tr height=30> 
        		<td>		&nbsp;		</td>
		<td align=right>		 Totaal (EUR)</td>
		<td>		<input type="text" style="text-align:right" name="allestotaal" size=5 value="0.00" class=iveld_n>
 	</td>
	</tr>
	</table>


	<br><br>

<!-- Start Opmerking, BeveiligingsCode en VerzendKnop -->

	<table width=90% border=0 cellpadding=0 cellspacing=0>
	<tr>
		<td  width=250 valign=top> Aanvulling, vraag of dergelijke </td>
		<td> <textarea name="opm" rows=5 cols=38 maxlength=255 class=iveld_e></textarea>	</td>
	</tr>
       	<tr height=30>
        		<td>	Beveiligingscode <img src="CaptchaSecurityImages.php?width=100&height=40&characters=5" />	 		</td>
		<td>	<input id="security_code" name="security_code" class=iveld_n size=20 type="text" />  	</td>
	</tr>
	</table>

	<br>


	<table width=90% border=0 cellpadding=0 cellspacing=0>
	<tr height=40>
		<td align=middle width=250>	
			&nbsp;
		</td>		
		<td align=middle width=275>	
			 <input type="submit" name="submit" align=center value=" Klik HIER om uw bestelling NU te plaatsen " class='knop'>
		</td>		
		<td align=middle>	
			&nbsp;
		</td>		
	</tr>
	</table>
</form>

<script language="JavaScript" type="text/javascript">
//You should create the validator only after the definition of the HTML form
  var frmvalidator  = new Validator("theForm");

  frmvalidator.addValidation("naam","req");
  frmvalidator.addValidation("naam","maxlen=50");

  frmvalidator.addValidation("adres","req");
  frmvalidator.addValidation("adres","maxlen=50");

  frmvalidator.addValidation("postcode","req");
  frmvalidator.addValidation("postcode","minlen=4");

  frmvalidator.addValidation("plaats","req");
  frmvalidator.addValidation("plaats","maxlen=50");

  frmvalidator.addValidation("telnr","maxlen=50");
  frmvalidator.addValidation("telnr","numeric");

  frmvalidator.addValidation("mailadres","maxlen=50");
  frmvalidator.addValidation("mailadres","req");
  frmvalidator.addValidation("mailadres","email");



</script>





<!-- <input type="submit" onClick="javascript:calcTotal()" value="Bereken totaalprijs">	-->


	<br>

</td></tr></table>

<br><br>

</center>

</BODY>
</HTML>

Ok, the first thing you need to do is turn off register_globals, recode your php to work off the post and not the $variable.
ie: $naam will be $_POST.

After these changes are made test out your script. If the problem persist, it still seems to be a security code issue.

Also, unless I am missing something, there is no need to wordwrap an HTML email, remove that line(103) from the php file.

This article has been dead for over six months. Start a new discussion instead.