Ik zit met een probleem en één van jullie PHP-pro's kan mij vast wel helpen =D, ik heb namelijk een mailscript, (niet van deze website of whatsoever), en hierin heb ik verschillende echo meldingen, alleen lukt het me niet om een echo te printen na exit(); die wordt aangezet door floodprotection.. Anyone, help me please =D
<?php
if(isset($_POST['verzend_contactformulier'])){
$datum = date('j-n-Y H:i');
setcookie("flood", "blaat", time()+120);
if(!empty($_POST['naam']) && !empty($_POST['email']) && !empty($_POST['comment'])){
if(eregi("^[A-Z0-9._%-]+@[A-Z0-9._%-]+\.[A-Z]{2,6}$", $_POST['email'])){
if(isset($_COOKIE['flood'])){
header("Location: $HTTP_REFERER");
exit();
}
switch($_POST['select']){
case "Edo (Webmaster)":
$email_naar = "[email protected]";
break;
case "Gijs":
$email_naar = "[email protected]";
break;
case "Vincent":
$email_naar = "[email protected]";
break;
case "Allemaal":
$email_naar = "[email protected], [email protected], [email protected]";
break;
}
mail($email_naar, "Bericht van ".$_POST['naam'], $_POST['comment']."\n\n\nBericht verzonden op: ".$datum."\nBericht van: ".$_POST['naam'].", ".$_POST['email'], "FROM: Chase SkateBoarding <[email protected]>");
echo "<b>Status:</b> Je bericht is verstuurd.";
}else{ echo "<b>Error:</b> Het ingevoerde e-mailadres was niet geldig. Probeer het <a href='contact.php'>opnieuw</a> !"; }
}else{ echo "<b>Error:</b> Niet alle velden waren ingevuld. Probeer het <a href='contact.php'>opnieuw</a> !"; }
echo "<br>";
}
else {
?>
<form name="form1" id="form1" method="post" action="">
<table width="450" border="0" cellspacing="2" cellpadding="0">
<tr>
<td width="100">
<font class="prehead">_</font>
<font class="head">Voornaam</font>
</td>
<td>
<input name="naam" type="text" id="naam" style="width: 143px" value="<?= $_POST['naam']; ?>" />
</td>
</tr>
<tr>
<td>
<font class="prehead">_</font>
<font class="head">E-mailadres</font>
</td>
<td>
<input name="email" type="text" id="email" style="width: 143px" value="<?= $_POST['email']; ?>" />
</td>
</tr>
<tr>
<td>
<font class="prehead">_</font>
<font class="head">Naar</font>
</td>
<td><select name="select" style="width: 145px">
<?php if($_POST['select'] == "Edo"){ echo "<option selected=\"selected\">Edo (Webmaster)</option>"; }else{ echo "<option>Edo (Webmaster)</option>"; } ?>
<?php if($_POST['select'] == "Gijs"){ echo "<option selected=\"selected\">Gijs</option>"; }else{ echo "<option>Gijs</option>"; } ?>
<?php if($_POST['select'] == "Vincent"){ echo "<option selected=\"selected\">Vincent</option>"; }else{ echo "<option>Vincent</option>"; } ?>
<?php if($_POST['select'] == "Allemaal"){ echo "<option selected=\"selected\">Allemaal</option>"; }else{ echo "<option>Allemaal</option>"; } ?>
</select>
</td>
</tr>
<tr>
<td valign="top">
<font class="prehead">_</font>
<font class="head">Bericht</font>
</td>
<td>
<textarea name="comment" cols="60" rows="10" id="comment" class="invis_scroll"></textarea>
</td>
</tr>
<tr>
<td>
</td>
<td height="18">
<input type="submit" name="verzend_contactformulier" value="Verstuur !" style="width:143px; height:15px;" />
</td>
</tr>
</table>
<?php
}
?>