|
|
Ralph Ras
Boîte Postale 85
06142 VENCE Cedex
FRANCE
Telephone:
Fax:
Mob:
Email: |
+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 .= '- Name '; $pI++; }
if(strlen($_POST['plaats']) < 4)
{ $pError .= '- City '; $pI++; }
if(strlen($_POST['telefoon']) < 3)
{ $pError .= '- Telephone '; $pI++; }
if(strlen($_POST['email']) < 6 || !ereg('@',$_POST['email']) || !ereg('.',$_POST['email']))
{ $pError .= '- Email '; $pI++; }
if(strlen($_POST['bericht']) < 10)
{ $pError .= '- Remarks '; $pI++; }
if(!empty($pError))
{ // Als er dan toch errors zijn..
echo ($pI == 1) ? 'The next field has not been filled in: ' : 'The following fields have not been filled in: '; // 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'])) ? '
Choice: '.$_POST['keuze'] : '';
$naam = (!empty($_POST['naam'])) ? '
Name: '.$_POST['naam'] : '';
$plaats = (!empty($_POST['plaats'])) ? '
City: '.$_POST['plaats'] : '';
$straat = (!empty($_POST['straat'])) ? '
Address: '.$_POST['straat'] : '';
$zip = (!empty($_POST['zip'])) ? '
Postal code: '.$_POST['zip'] : '';
$telefoon = (!empty($_POST['telefoon'])) ? '
Telephone: '.$_POST['telefoon'] : '';
$email = (!empty($_POST['email'])) ? '
Email: '.$_POST['email'] : '';
$opm = (!empty($_POST['bericht'])) ? '
Remarks: '.$_POST['bericht'] : '';
$pBericht = 'The following is reported has been sent by means of the contact form:
'.$keuze.$naam.$plaats.$straat.$zip.$telefoon.$email.$opm;
mail($cEmail,$cOndPre.' '.$_POST['onderwerp'].' '.$cOndSuf,$pBericht,$pHeader);
echo 'Your information has been sent.
Ralph Ras will contact you as soon as possible.';
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 'You can send in the '.$cSpam.' minutes a e-mail!'; }
if(!isset($pShow))
{ // het formulier als $pShow niet bestaat.
?>
}
?>
|
 |
Team Côte d’Azur
Officieel dealer voor de regio Alpes Maritimes de Var en Monaco |
|