3v4l.org

run code in 300+ PHP versions simultaneously
<?php $to = 'vladlex007@gmail.com'; $subject = 'this came from your mother'; $name = $_POST['name']; $email = $_POST['email']; $topic= $_POST['topic']; $message = $_POST['message']; $body = <<<EMAIL Hi! My name is $name and my topic is: $topic $message Frome $name Oh beach my email: $email EMAIL; $header = "From: $email"; if($_POST){ if($name == '' || $email == '' || $message == ''){ $feedback = 'fill out fealds'; }else{ mail($to, $subject, $body, $header); $feedback = 'thancks'; } } ?> <!doctype html> <html lang="ru"> <head> <meta charset='utf-8' /> <style type='text/css'> form { width: 400px; } form ul { list-style-type: none; } form ul li { margin: 15px 0; } form label { bisplay: block; font-size: 11pt; } form input, testarea, select { font-size: 11pt; paddong: 5px; border: #ccc 3px solid; width: 100%; } </style> </head> <p id="feedback"><?php echo $feedback; ?> <form action="?" method="post"> <ul> <li> <label for="name">Name:</label> <input type="text" name="name" id="name" /> </li> <li> <label for="email">Email:</label> <input type="text" name="email" id="email" /> </li> <li> <label for="topic">Topic:</label> <select id="topic" name="topic"> <option value="Ponies">Ponies</option> <option value="Mexicans">Mexicans</option> <option value="Weiner">Weiner</option> </select> </li> <li> <label for="message">message:</label> <textarea id="message" name="message" cols="42" rows="9"></textarea> </li> <li><input type="submit" value="Submit"><li> </ul> </form> </html>

preferences:
53.11 ms | 402 KiB | 5 Q