3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php if ($_SERVER['REQUEST_METHOD'] == "POST") { $sql = mysqli_query($c, "SELECT username,password FROM personeel,administrators WHERE username='".mysqli_real_escape_string($c, $_POST['username'])."'AND password='".mysqli_real_escape_string($c, sha1($_POST['password']))."'") ; if ($sql == TRUE) { setcookie("username", $_POST['username'], time()+1800); setcookie("loggedin", TRUE, time()+1800); unset ($_POST); Header ("Location: landing.php"); } else { echo mysqli_error($c); //Hier straks: "Gegevens niet gevonden" van maken } //Sluit COOKIE/REDIRECT/SQL maken af } //sluit IF METHOD POST ?>
Output for 5.3.0 - 7.1.0
Notice: Undefined index: REQUEST_METHOD in /in/GE5F4 on line 2
Output for 4.3.0 - 5.2.17
Notice: Undefined index: REQUEST_METHOD in /in/GE5F4 on line 2