After finding out that php need to be run through a server and not as a normal .html file, I need to send an email to the "person" to make an appointment.
Here is my code:
<?php
echo "<form method='post' action='mailform.php'>
Email: <input name='email' type='text'><br>
Subject: <input name='subject' type='text'><br>
Message:<br>
<textarea name='message' rows='15' cols='40'>
</textarea><br>
<input type='submit'>
</form>";
$email = $_REQUEST['email'] ;
$subject = $_REQUEST['subject'] ;
$message = $_REQUEST['message'] ;
if(mail($email, $subject, $message, "From:" . $email))
{
printf("Email sent.");
}
?>
But it doesnt send the email. This code is imbedded inside a .html file and I execute it by http://localhost/email.php