Hello everybody. i just started with php. i’ll make an contact form and make a html code and a post.php but i’ve ill send the form i have the echo ‘U heeft niet alle velden ingevuld!’; line so it wont send. can anybody help me?
<?php session_start(); if (!isset($_POST['achternaam']) || !isset($_POST['telefoonnummer']) || !isset($_POST['email']) || !isset($_POST['informatie']) || !isset($_POST['bericht'])) { echo 'U heeft niet alle velden ingevuld!'; exit; } $voornaam = htmlspecialchars($_POST['voornaam']); $achternaam = htmlspecialchars($_POST['achternaam']); $telefoonnummer = htmlspecialchars($_POST['telefoonnummer']); $email = htmlspecialchars($_POST['email']); $informatie = htmlspecialchars($_POST['informatie']); $bericht = htmlspecialchars($_POST['bericht']); $tijd = time(); $datum = strftime('%d/%m/%y %H:%M', $tijd); $ip = getenv('REMOTE_ADDR'); $message = $voornaamnaam + ' '; $message = $message + $achternaam + ' '; $message = $message + $telefoonnummer + ' '; $message = $message + $email + ' '; $message = $message + $informatie. ' en het IP '.$ip.' stuurde op '.$datum.' het volgende bericht: \n____________________________________\n'.$bericht.'------------------------------------\n'; mail('[email protected]', 'contact formulier eagle websites', $message, $email); echo 'Uw bericht is verzonden. U krijgt zo snel mogelijk antwoord. Eagle Websites'; ?>It means one of your $_POST variables are missing. You would have to post the form HTML