3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $var ="PHP TUTORIAL"; ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title><?php echo $var ?></title> </head> <body><form method="post"> <h3><?php echo $var ?></h3> <h1>Please input your name</h1> <input type="text" name="name"> <input type="submit" value="envoyer formulaire"></br></br> <?php if (!empty($_POST['name'])){ $name = $_POST['name']; echo '<h3>HELLO '.$name.' </h3>'; } else { $name= 'veuillez renseigner votre nom'; echo $name; } ?> </form> </html>
based on HI8HK
Output for 4.3.0 - 7.1.0
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>PHP TUTORIAL</title> </head> <body><form method="post"> <h3>PHP TUTORIAL</h3> <h1>Please input your name</h1> <input type="text" name="name"> <input type="submit" value="envoyer formulaire"></br></br> veuillez renseigner votre nom</form> </html>