3v4l.org

run code in 300+ PHP versions simultaneously
<html> <head> <title>Mailformulier </title> </head> <body> <?php ini_set("SMTP", "mail.live.com"); ini_set("smtp_poort", 25); ini_set("sendmail_from", "mailadres"); if($_POST["verzendbutton"] != "verzenden" || !$_POST["naam"] || !$_POST["mailadres"] || !$_POST["reactie"]) { // dus als het formulier leeg is of de waarde niet zijn ingevuld ?> <form action="mailform3.php" method = "post"> <?php if ($_POST["verzendbutton"] && !$_POST["naam"] && !$_POST["mailadres"] || !$_POST["reactie"]) { echo "<font color=\"red\"> Vul hier uw mailadres in</font><br>"; } ?> naam: <input type = "text" name = "naam" value ="<?php echo $_POST =["naam"] ?>"><br> <?php if ($_POST["verzendbutton"] && !$_POST["mailadres"]) { echo "<font color =\"red\"> Vul hier uw mailadres in!</font><br>"; } ?> E-mail: <input type = "text" name ="mailadres" value="<?php echo $_POST["mailadres"] ?>"><br> <?php if ($_POST["verzendbutton"] && !$_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 { $boodschap = "Naam: ".$_POST["naam"]."\ncommentaar: ".$_POST["reacrie"]; mail($_POST["mailadres"], "Uw reactie van de website", $boodschap); echo "Bedankt ".$_POST["naam"].", fijn dat je mee wilde doen!"; } ?> </body> </html>

preferences:
38.64 ms | 402 KiB | 5 Q