|
|
Ralph Ras
Boîte Postale 85
06142 VENCE Cedex
FRANCE
Tel:
Fax:
Mob:
E-Mail: |
+33(0) 4 93 58 63 01
+33(0) 4 93 24 65 29
+33(0) 6 07 02 17 12
garden@ralph-ras.com |
|
if(!empty($_POST['verstuur']))
{ // Er is op de knop 'verstuur e-mail' gedrukt...
$pError = ''; // Een begin met de errors als die er zijn
$pI = 0; // Deze telt het aantal erros.
if(strlen($_POST['naam']) < 2)
{ $pError .= '- Names '; $pI++; }
if(strlen($_POST['plaats']) < 4)
{ $pError .= '- Ort '; $pI++; }
if(strlen($_POST['telefoon']) < 3)
{ $pError .= '- Telefonnummer '; $pI++; }
if(strlen($_POST['email']) < 6 || !ereg('@',$_POST['email']) || !ereg('.',$_POST['email']))
{ $pError .= '- E-Mail '; $pI++; }
if(strlen($_POST['bericht']) < 10)
{ $pError .= '- Anmerkungen '; $pI++; }
if(!empty($pError))
{ // Als er dan toch errors zijn..
echo ($pI == 1) ? 'Bitte folgendes Feld ausfüllen: ' : 'Bitte folgende Felder ausfüllen: '; // even kijken of het meervoud of enkelvoud is.
echo $pError; // echoën van de error(s)
}
else
{
// uiteindelijk toch mailen :)
$pHeader = "MIME-Version: 1.0\r\n";
$pHeader .= "Content-type: text/html; charset=iso-8859-1\r\n";
$pHeader .= "To: ".$cNaam." <".$cEmail.">\r\n";
$pHeader .= "From: ".$_POST['naam']." <".$_POST['email'].">\r\n";
$keuze = (!empty($_POST['keuze'])) ? '
Keuze: '.$_POST['keuze'] : '';
$naam = (!empty($_POST['naam'])) ? '
Naam: '.$_POST['naam'] : '';
$plaats = (!empty($_POST['plaats'])) ? '
Plaats: '.$_POST['plaats'] : '';
$straat = (!empty($_POST['straat'])) ? '
Straat en nummer: '.$_POST['straat'] : '';
$zip = (!empty($_POST['zip'])) ? '
Postcode: '.$_POST['zip'] : '';
$telefoon = (!empty($_POST['telefoon'])) ? '
Telefoon: '.$_POST['telefoon'] : '';
$email = (!empty($_POST['email'])) ? '
Email: '.$_POST['email'] : '';
$opm = (!empty($_POST['bericht'])) ? '
Bericht: '.$_POST['bericht'] : '';
$pBericht = 'Folgende Information wurde per Kontaktformular versendet:
'.$keuze.$naam.$plaats.$straat.$zip.$telefoon.$email.$opm;
mail($cEmail,$cOndPre.' '.$_POST['onderwerp'].' '.$cOndSuf,$pBericht,$pHeader);
echo 'Ihre Anfrage wurde gesendet.
Wir werden uns in Kürze mit Ihnen in Verbindung setzen.';
setcookie('mailform',1,time()+($cSpam*60)); // cookie zetten tegen spam
$pShow = true; // formulier wordt niet weer getoond
}
}
// Kijken of er een waarde moet worden gegeven aan velden...
$pKeuze = (isset($_POST['keuze'])) ? $_POST['keuze'] : '';
$pNaam = (isset($_POST['naam'])) ? $_POST['naam'] : '';
$pEmail = (isset($_POST['email'])) ? $_POST['email'] : '';
$pOnderwerp = (isset($_POST['onderwerp'])) ? $_POST['onderwerp'] : '';
$pPlaats = (isset($_POST['plaats'])) ? $_POST['plaats'] : '';
$pStraat = (isset($_POST['straat'])) ? $_POST['straat'] : '';
$pZip = (isset($_POST['zip'])) ? $_POST['zip'] : '';
$pTelefoon = (isset($_POST['telefoon'])) ? $_POST['telefoon'] : '';
$pBericht = (isset($_POST['bericht'])) ? $_POST['bericht'] : '';
// kijken of het cookie bestaat, zoja dan wordt het formulier niet getoond.
if(isset($_COOKIE['mailform']))
{ $pShow = true; echo 'Sie können alle '.$cSpam.' Minuten eine E-mail verschicken!'; }
if(!isset($pShow))
{ // het formulier als $pShow niet bestaat.
?>
}
?>
|
 |
Team Côte d’Azur
Exclusiv-Vertretung für die Region Alpes-Maritimes, Var und Monaco |
|