Beste leden,
Op de website http://teamsportkleding.nl staat een contact formulier.
Volgens mij verwerkt hij het wel maar komt het niet aan op mijn email.
Kan iemand helpen en kijken wat het probleem is.
contact.php
PHP
<?php
if($action=="check") { include('check_contactformulier.php');
} else { include('contactformulier.php'); }
?>
contactformulier:
PHP
form action="?i=contactformulier&action=check" name="contactform" id="contactform" method="post">
<table border="0" cellpadding="2" cellspacing="0" >
<tr>
<td height="4" colspan="6" align="right" valign="middle" nowrap="nowrap"></td>
</tr>
<tr>
<td valign="middle" nowrap="nowrap">Bedrijf </td>
<td colspan="3" valign="middle" nowrap="nowrap">:
<input name="Bedrijf" type="text" class="veld" id="Bedrijf" size="22" /></td>
<td width="10" rowspan="7" align="right" valign="middle" nowrap="nowrap"></td>
<td rowspan="7" align="right" valign="top"><textarea name="Bericht" cols="35" rows="7" class="textarea" id="Bericht"></textarea></td>
</tr>
<tr>
<td valign="middle">Naam <font class="rood">*</font></td>
<td colspan="3" valign="middle" nowrap="nowrap">:
<input type="text" name="Naam" size="21" class="veld" /></td>
</tr>
<tr>
<td valign="middle" nowrap="nowrap">Adres</td>
<td colspan="3" valign="middle" nowrap="nowrap"> :
<input name="Adres" type="text" class="veld" id="Adres" size="21" /></td>
</tr>
<tr>
<td valign="middle" nowrap="nowrap">Postcode </td>
<td colspan="3" valign="middle" nowrap="nowrap">:
<input name="Postcode" type="text" class="veld" id="Postcode" size="21" maxlength="7" /></td>
</tr>
<tr>
<td valign="middle">Plaats</td>
<td colspan="3" valign="middle" nowrap="nowrap">:
<input name="Plaats" type="text" class="veld" id="Plaats" size="21" /></td>
</tr>
<tr>
<td valign="middle">Telefoon</td>
<td colspan="3" valign="middle" nowrap="nowrap"> :
<input name="Telefoon" type="text" class="veld" id="Telefoon" size="21" /></td>
</tr>
<tr valign="top">
<td valign="middle"><div align="left">E-mail <font class="rood">*</font></div></td>
<td colspan="3" valign="middle" nowrap="nowrap"> :
<input type="text" name="Email" id="Email" size="21" class="veld" /></td>
</tr>
<tr valign="bottom">
<td height="4" colspan="6" align="right" valign="top" nowrap="nowrap" ></td>
</tr>
<tr valign="bottom">
<td height="4" colspan="6" align="right" valign="bottom" nowrap="nowrap" style="background : url(../images/dots.gif); background-repeat:repeat-x" ></td>
</tr>
<tr valign="bottom">
<td height="4" colspan="6" align="right" valign="top" nowrap="nowrap" ></td>
</tr>
<tr valign="bottom">
<td colspan="6" valign="top" align="right" ><input type="reset" name="Reset" value="wissen " class="button" />
<input name="submit" type="submit" class="button" value="formulier verzenden" /></td>
</tr>
</table>
</form>
Toon Meer
checkformulier:
PHP
<?php
$check = "";
$date= date ("d-m-Y");
$time= date ("H:i");
$Postcode = str_replace(" ","",$Postcode);
$Telefoon = str_replace(" ","",$Telefoon);
$Naam = htmlentities($Naam);
$Plaats = htmlentities($Plaats);
$Adres = htmlentities($Adres);
$Postcode = htmlentities($Postcode);
$Telefoon = htmlentities($Telefoon);
$Bericht = ereg_replace("\r","<br />",$Bericht);
$Bericht = ereg_replace("&","&",$Bericht);
if ($Naam == "") {
$font_Naam = "<font class=\"rood\">Naam *</font>";
$field_Naam = "notok";
} else {
$font_Naam = "Naam *";
$field_Naam = "ok";
}
if($Email=="") {
$font_Email = "<font class=\"rood\">E-mail *</font>";
$field_Email = "notok";
} else if (!eregi("^[A-Z0-9._%-]+@[A-Z0-9._%-]+\.[A-Z]{2,6}$", $Email)) {
$font_Email = "<font class=\"rood\">E-mail *</font>";
$field_Email = "notok";
} else {
$font_Email = "E-mail *";
$field_Email = "ok";
}
if ($Bericht == "") {
$font_Bericht = "<font class=\"rood\">*</font>";
$field_Bericht = "notok";
$focus="";
} else {
$font_bericht = "";
$field_Bericht = "ok";
$focus="";
}
if (($field_Naam == "ok") && ($field_Email == "ok") && ($field_Bericht == "ok")){
// send message
$to = "[email protected]";
//$to = "[email protected]";
//$ccTo = "";
$owner="Van Rutten Promotion";
$subject ="Bericht via de website teamsportkleding.nl";
$body ="<HTML> \n";
$body .="<HEAD><TITLE>Van Rutten Promotion</TITLE>
<style type=\"text/css\">
body { font-family: Verdana, Arial; font-size:12px; }
td { font-family: Verdana, Arial; font-size:12px; }
</style> \n";
$body .="</HEAD><BODY> \n";
$body .="<table width=\"500\" border=\"0\" cellpadding=\"2\"> \n";
$body .="<tr><td><img src=\"http://www.teamsportkleding.nl/mail/logo.gif\" alt=\"Logo\" width=\"500\" height=\"55\"/></td></tr> \n";
$body .="<tr><td><br /> \n";
$body .=" Bedrijf : $Bedrijf<br /> \n";
$body .=" Naam : $Naam<br /> \n";
$body .=" Adres : $Adres<br /> \n";
$body .=" Postcode : $Postcode<br /> \n";
$body .=" Plaats : $Plaats<br /> \n";
$body .=" Telefoon : $Telefoon<br /> \n";
$body .=" E-mail : $Email<br /> \n";
$body .=" Telefoon : $Telefoon<br /><br /> \n";
$body .=" <b>Bericht :</b><br /> \n";
$body .="</td></tr> \n";
$body .="<tr><td>$Bericht <br /><br /></td></tr> \n";
$body .="<tr><td><img src=\"http://www.teamsportkleding.nl/mail/lijn.gif\" alt=\"Lijn\" width=\"500\" height=\"6\"/></td></tr> \n";
$body .="<tr><td><small>Dit bericht is via www.teamsportkleding.nl verzonden op : $date om $time</small></td></tr> \n";
$body .="</table> \n";
$body .="</BODY><HTML> \n";
$header = "MIME-Version: 1.0\n";
$header .= "Content-type: text/html; charset=iso-8859-1\n";
$header .= "From: <$Email>\n";
$headers .= "Return-Path: <$to>\n";
$header .= "Reply-To: $Email <$Email>\n";
mail($to, $subject, $body, $header);
// replay sender
$subject2 ="Uw bericht aan Van Rutten Promotion van: $date";
$body2 ="<html> \n";
$body2 .="<head><title>Van Rutten Promotion</title>
<style type=\"text/css\">
body { font-family: Verdana, Arial; font-size:12px; }
td { font-family: Verdana, Arial; font-size:12px; }
</style> \n";
$body2 .="</head><body> \n";
$body2 .="<table width=\"500\" border=\"0\" cellpadding=\"2\"> \n";
$body2 .="<tr><td><img src=\"http://www.teamsportkleding.nl/mail/logo.gif\" alt=\"Logo\" width=\"500\" height=\"55\"/></td></tr> \n";
$body2 .="<tr><td><br />Beste $Naam,<br /><br />Wij hebben uw bericht ontvangen, en deze wordt zo spoedig mogelijk verwerkt !<br /><br /><br />Met vriendelijke groet,<br />Van Rutten Promotion<br /><br /></td></tr> \n";
$body2 .="<tr><td><img src=\"http://www.teamsportkleding.nl/mail/lijn.gif\" alt=\"Lijn\" width=\"500\" height=\"6\"/></td></tr> \n";
$body2 .="</table> \n";
$body2 .="</body><html> \n";
$headers2 = "MIME-Version: 1.0\n";
$headers2 .= "Content-type: text/html; charset=iso-8859-1\n";
$headers2 .= "From: $owner <$to>\n";
$headers2 .= "Return-Path: <$to>\n";
mail($Email, $subject2, $body2, $headers2);
// einde replay to sender
echo"<META HTTP-EQUIV=\"refresh\" content=\"4;URL=../vanrutten/contact.php\";clearstatcache(); >";
?>
<br />
<h4 style="margin-bottom:20px;">Uw bericht wordt verzonden !</h4>
<p style="margin-bottom:138px;">Er wordt een bevestiging verzonden naar uw e-mailadres.</p>
<?php
} else {
?>
<form action="?i=contactformulier&action=check" name="contactform" id="contactform" method="post">
<table border="0" cellpadding="2" cellspacing="0" >
<tr>
<td height="4" colspan="6" align="right" valign="middle" nowrap="nowrap"></td>
</tr>
<tr>
<td valign="middle" nowrap="nowrap">Bedrijf </td>
<td colspan="3" valign="middle" nowrap="nowrap">:
<input name="Bedrijf" type="text" class="veld" id="Bedrijf" value="<?php echo"$Bedrijf"; ?>" size="22" /></td>
<td width="10" rowspan="7" align="right" valign="top" nowrap="nowrap"><font class="rood"><strong><?php echo "$font_Bericht"; ?></strong></font></td>
<td rowspan="7" align="right" valign="top"><textarea name="Bericht" cols="35" rows="7" class="textarea" id="Bericht"><?php echo"$Bericht"; ?></textarea></td>
</tr>
<tr>
<td valign="middle"><?php echo "$font_Naam"; ?></td>
<td colspan="3" valign="middle" nowrap="nowrap">:
<input name="Naam" type="text" class="veld" value="<?php echo"$Naam"; ?>" size="21" /></td>
</tr>
<tr>
<td valign="middle" nowrap="nowrap">Adres</td>
<td colspan="3" valign="middle" nowrap="nowrap"> :
<input name="Adres" type="text" class="veld" id="Adres" value="<?php echo"$Adres"; ?>" size="21" /></td>
</tr>
<tr>
<td valign="middle" nowrap="nowrap">Postcode </td>
<td colspan="3" valign="middle" nowrap="nowrap">:
<input name="Postcode" type="text" class="veld" id="Postcode" value="<?php echo"$Postcode"; ?>" size="21" maxlength="7" /></td>
</tr>
<tr>
<td valign="middle">Plaats</td>
<td colspan="3" valign="middle" nowrap="nowrap">:
<input name="Plaats" type="text" class="veld" id="Plaats" value="<?php echo"$Plaats"; ?>" size="21" /></td>
</tr>
<tr>
<td valign="middle">Telefoon </td>
<td colspan="3" valign="middle" nowrap="nowrap"> :
<input name="Telefoon" type="text" class="veld" id="Telefoon" value="<?php echo"$Telefoon"; ?>" size="21" /></td>
</tr>
<tr valign="top">
<td valign="middle"><?php echo "$font_Email"; ?></td>
<td colspan="3" valign="middle" nowrap="nowrap"> :
<input name="Email" type="text" class="veld" id="Email" value="<?php echo"$Email"; ?>" size="21" /></td>
</tr>
<tr valign="bottom">
<td height="4" colspan="6" align="right" valign="top" nowrap="nowrap" ></td>
</tr>
<tr valign="bottom">
<td height="4" colspan="6" align="right" valign="bottom" nowrap="nowrap" style="background : url(../images/dots.gif); background-repeat:repeat-x" ></td>
</tr>
<tr valign="bottom">
<td height="4" colspan="6" align="right" valign="top" nowrap="nowrap" ></td>
</tr>
<tr valign="bottom">
<td colspan="6" valign="top" align="right" ><input type="reset" name="Reset" value="wissen " class="button" />
<input name="submit" type="submit" class="button" value="formulier verzenden" /></td>
</tr>
</table>
</form>
<?php
}
?>
Toon Meer