Test
Posted in PHP, on January 14, 2012 at 09:02
<?php
   header( \'Location: send.html\' ) ;
if (!isset($_POST[\'naam\']) || !isset($_POST[\'email\']) || !isset($_POST[\'bericht\'])) {
	echo \'U heeft niet alle velden ingevuld!\';
	exit;
}

$naam = htmlspecialchars($_POST[\'naam\']);
$email = htmlspecialchars($_POST[\'email\']);
$bericht = htmlspecialchars($_POST[\'bericht\']);

$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.\'
------------------------------------\';

mail(\'roel_wit@hotmail.com\', \'Contact via website\', $message, \'From: \'.$email);

echo \'Uw bericht is verzonden. U krijgt zo snel mogelijk antwoord.\';
?>

Share this code

| More

Use the link below to share the code:
HTML
BBCode