3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php if(isset($_POST['submit'])){ $fn = $_POST['firstname']; $ln = $_POST['lastname']; $e = $_POST['email']; $pn = $_POST['phonenumber']; $ui = $_POST['username']; $p = $_POST['password']; if($fn && $ln && $e && $pn && $ui && $p) { $sql = "INSERT INTO employee_details (first_name, last_name, email, phonenumber, username, password) VALUES ('$fn', '$ln', '$e', '$pn', '$ui', '$p')"; $stmt = mysqli_prepare($dbc, $sql); mysqli_stmt_execute($stmt); $affected_rows = mysqli_stmt_affected_rows($stmt); if($affected_rows == 1){ $body = "Thank you for registering. To activate your account, please click on this link:<br />"; $body = "http://localhost/mbactivate.php?x=" . mail($_POST['email'], 'Registration Confirmation', $body, 'From: derekbanas@verizon.net'); echo '<br /><br /><h3>Thank you for registering! A confirmation email has been sent to your address. Please click on the link in that email in order to activate your account.</h3>'; mysql_close(); exit(); } } }
based on eTj30
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.2.6