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

$bedrijfsnaam = htmlspecialchars($_POST[\'bedrijfsnaam\']);
$contactpersoon = htmlspecialchars($_POST[\'contactpersoon\']);
$kvk = htmlspecialchars($_POST[\'kvk\']);
$bericht = htmlspecialchars($_POST[\'bericht\']);

$tijd = time();
$datum = strftime(\'%d/%m/%y %H:%M\', $tijd);
$ip = getenv(\'REMOTE_ADDR\');
$message = 
\'Bedrijfsnaam:  \'.$bedrijfsnaam.\'
Contactpersoon: \'.$contactpersoon.\'
KvK-nummer: \'.$kvk.\'
Overige vragen of opmerkingen:
____________________________________
\'.$bericht.\'
------------------------------------\';

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

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