3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php <?php if ($stmt = $mysqli->prepare("INSERT INTO `regisrations`(`country`,`state`,`IP`,`email`,`firstname`,`lastname`,`othernames`,`pin`,`dayphone`,`postal`,`affiliation`) VALUES (?,?,?,?,?,?,?,?,?,?,?)")){ $stmt->bind_param('ssssssissss',$_SESSION[country],$_SESSION[state],$_SESSION[IP],$_SESSION[email],$_SESSION[firstname],$_SESSION[lastname],$_SESSION[othernames],$_SESSION[pin],$_SESSION[dayphone],$_SESSION[postal],$_SESSION[affiliation]); $_SESSION[country] = $_POST['country']; $_SESSION[state] = $_POST['state']; $_SESSION[IP] = $_POST['IP']; $_SESSION[email] = $_POST['email']; $_SESSION[firstname] = $_POST['firstname']; $_SESSION[lastname] = $_POST['lastname']; $_SESSION[othernames] = $_POST['othernames']; $_SESSION[pin] = $_POST['pin']; $_SESSION[dayphone] = $_POST['dayphone']; $_SESSION[postal] = $_POST['postal']; $_SESSION[affiliation] = $_POST['affiliation'];var_dump($result); $stmt->execute(); $stmt->close(); }else { printf("Prepared Statement Error: %s\n", $mysqli->error); } echo "<h1>Registration Complete!</h1>"; echo "<br />Thank you! You should receive an email shortly confirming your registration as shown below:"; $msg = "Thank you for registering. we are verifying your details and then create your account<br /><br />"; $msg .= "===================================================================<br />"; $msg .= "Contact Information:<br />"; $msg .= "===================================================================<br />"; $msg .= "Type: $_SESSION[country] <br />"; $msg .= "Organisation Name: $_SESSION[state] <br />"; $msg .= "Organisation Pin: $_SESSION[IP] <br />"; $msg .= "Email: $_SESSION[email] <br />"; $msg .= "Participant Name: $_SESSION[firstname] <br />"; $msg .= "Surname: $_SESSION[lastname] <br />"; $msg .= "Other Names: $_SESSION[othernames] <br />"; $msg .= "Participant PIN : $_SESSION[pin] <br />"; $msg .= "Phone: $_SESSION[dayphone] <br />"; $msg .= "Postal Address: $_SESSION[postal] <br />"; $msg .= "Designation: $_SESSION[affiliation] <br />"; $msg .= "Designation: $_SESSION[affiliation] <br />"; $msg .= "===================================================================<br />"; $msg .= "If you have any questions, contact us on Tel: 020 4965508 or Email: contactcentre@kentrade.go.ke<br />"; echo $msg; //Send confirmation message to user. $sender = "noreply@kentrade.go.ke"; $subject = "Registration Confirmed"; $mailheaders = "MIME-Version: 1.0\r\n"; $mailheaders .= "Content-type: text/html; charset=ISO-8859-1\r\n"; $mailheaders .= "From: $sender"; mail($_SESSION[email], $subject, $msg, $mailheaders); ?>
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.4.32
Parse error: syntax error, unexpected '<' in /in/2jn6i on line 2
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected '<' in /in/2jn6i on line 2
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/2jn6i on line 2
Process exited with code 255.