Hey guys, i'm quite new to php and my mail function wont work and i don't know why...
<?php
//if "email" variable is filled out, send email
if (isset($_REQUEST['email'])) {
//Email information
$admin_email = "example@mail.com";
$name = $_REQUEST['email'];
$email = $_REQUEST['email'];
$date = $_REQUEST['date'];
$uur = $_REQUEST['uur'];
$behandeling = $_REQUEST['behandeling'];
$comment = $date ."\r\n";
$comment .= $uur ."\r\n";
$comment .= $behandeling ."\r\n";
$comment .= $name;
//send email
mail($admin_email, "afspraak", $comment, "From:" . $email);
//Email response
echo "Bedankt voor uw afspraak!";
}
//if "email" variable is not filled out, display the form
else {
?>
<form method="post">
<input name="email" type="email" placeholder="email@adress.com" required/>
<input type="text" name="name" placeholder="Voornaam Naam" required></input>
<input type="text" name="date" placeholder="Datum: DD/MM/JJJJ" required></input>
<input type="text" name="uur" placeholder="jouw beschikbaarheid, bvb: '14:00 - 16:00'" required></input>
<input type="text" name="behandeling" placeholder="Behandeling, bvb: Pedicure en manicure" required></input>
<span>Vermeld de gewenste datum, het gewenste uur <br>en de behandeling a.u.b. <br>Hou na de e-mail je mailbox in de gaten voor een antwoord.</span><br><br>
<input type="submit" class="myButton" value="Verzend" />
</form>
<?php
}
?>