- 05 aug 2010, 11:54
#23833
Bedankt Luc,
Maar nu iets nieuws, ik krijg voor de keuzeknoppen alleen "on" gemaild .....
Zie code;
if (!isset($_POST['naam']) || !isset($_POST['email']) || !isset($_POST['bericht']) || !isset($_POST['Antwoord1']) || !isset($_POST['Antwoord2']) || !isset($_POST['Antwoord3'])) {
echo 'U heeft niet alle velden ingevuld!';
exit;
}
$naam = htmlspecialchars($_POST['naam']);
$email = htmlspecialchars($_POST['email']);
$bericht = htmlspecialchars($_POST['bericht']);
$Antwoord1 = htmlspecialchars($_POST['Antwoord1']);
$Antwoord2 = htmlspecialchars($_POST['Antwoord2']);
$Antwoord3 = htmlspecialchars($_POST['Antwoord3']);
?>
if (!isset($_POST['naam']) || !isset($_POST['email']) || !isset($_POST['bericht']) || !isset($_POST['Antwoord1']) || !isset($_POST['Antwoord2']) || !isset($_POST['Antwoord3'])) {
echo 'U heeft niet alle velden ingevuld!';
exit;
}
$naam = htmlspecialchars($_POST['naam']);
$email = htmlspecialchars($_POST['email']);
$bericht = htmlspecialchars($_POST['bericht']);
$Antwoord1 = htmlspecialchars($_POST['Antwoord1']);
$Antwoord2 = htmlspecialchars($_POST['Antwoord2']);
$Antwoord3 = htmlspecialchars($_POST['Antwoord3']);
$tijd = time();
$datum = strftime('%d/%m/%y %H:%M', $tijd);
$ip = getenv('REMOTE_ADDR');
$message = $naam.' met het e-mailadres '.$email.' en het IP '.$ip.' stuurde op '.$datum.' het volgende bericht:
____________________________________
'.$bericht.'
'.$Antwoord1.'
'.$Antwoord2.'
'.$Antwoord3.'
------------------------------------';
?>
if (!isset($_POST['naam']) || !isset($_POST['email']) || !isset($_POST['bericht']) || !isset($_POST['Antwoord1']) || !isset($_POST['Antwoord2']) || !isset($_POST['Antwoord3'])) {
echo 'U heeft niet alle velden ingevuld!';
exit;
}
$naam = htmlspecialchars($_POST['naam']);
$email = htmlspecialchars($_POST['email']);
$bericht = htmlspecialchars($_POST['bericht']);
$Antwoord1 = htmlspecialchars($_POST['Antwoord1']);
$Antwoord2 = htmlspecialchars($_POST['Antwoord2']);
$Antwoord3 = htmlspecialchars($_POST['Antwoord3']);
$tijd = time();
$datum = strftime('%d/%m/%y %H:%M', $tijd);
$ip = getenv('REMOTE_ADDR');
$message = $naam.' met het e-mailadres '.$email.' en het IP '.$ip.' stuurde op '.$datum.' het volgende bericht:
____________________________________
'.$bericht.'
'.$Antwoord1.'
'.$Antwoord2.'
'.$Antwoord3.'
------------------------------------';
mail('contact@weerstation-grootegast.nl', 'Bericht van weerstation-grootegast.nl', $message, 'From: '.$email);
echo 'Uw bericht is verzonden. Na 14 september wordt de winnaar via mail en de site bekendgemaakt';
?>