<html>
<head>
<title> Mailformulier </title>
</head>
<body>
<?php
ini_set("SMTP", "mail.mijndomein,nl");
ini_set("smtp_port", 26);
ini_set ("sendmail_from", "info@rubensky.com");
if($_SERVER['REQUEST_METHOD']=="POST") {
$name = $_POST['name'];
$mail = $_POST['mail'];
$reactie = $_POST['reactie'];
?>
<form action="mailform3.php" method= "post">
<?php
if (trim($_POST['name'])=="") {
echo "<font color=\"red\"> Vul hier uw naam in!</font><br>";
}
?>
Naam: <input type="text" name="naam" value="<?php echo $_POST["name"];
?>"> <br>
<?php
if (trim($_POST['mail'])=="") {
echo "<font color=\"red\"> Vul hier uw mailadres in!</font><br>";
}
?>
E-mail: <input type="text" name="mailadres" value="<?php echo $_POST["mail"]; ?>"><br>
<?php
if (trim($_POST['reactie'])=="") {
echo "<font color=\"red\"> Vul hier uw reactie in!</font><br>";
}
?>
Uw reactie <textarea cols="30"rows="4" name="reactie"><?php echo $_POST["reactie"]; ?></textarea>
<input type="submit" value="verzenden" name="verzendbutton">
</form>
<?php
} else {
mail($name, $mail, $reactie) or die("Error!");
echo "Thank You!" . " -" . "<a href='form.html' style='text-decoration:none;color:#ff0099;'> Return Home</a>";
}
?>
</body>
</html>