3v4l.org

run code in 300+ PHP versions simultaneously
<?php session_start(); require "config.php"; //Check to see if the user is logged in. if(isset($_SESSION['username'])){ header("location: members.php"); } //Check to see if the user click the button if(isset($_POST['submit'])) { $user=$_POST['user']; $pass=$_POST['pass']; //Prevent MySQL Injections $user  = stripslashes($user); $pass  = stripslashes($pass); $user = mysqli_real_escape_string($con, $user); $pass = mysqli_real_escape_string($con, $pass); //Check to see if the user left any space empty! if($user == "" || $pass == "") { echo "Please fill in all the information!"; } //Check to see if the username AND password MATCHES the username AND password in the DB else { $query = mysqli_query($con,"SELECT * FROM members WHERE username = '$user' and password = '$pass'") or die("Can not query DB."); $count = mysqli_num_rows($query);   if ($count == 1) { $_SESSION['username']=$user; //Create a session for the user! header ("location: members.php"); }     else{   echo "Username and Password DO NOT MATCH! TRY AGAIN!";   } } } ?>
Output for 5.4.0 - 5.4.20
Parse error: syntax error, unexpected 'if' (T_IF) in /in/69Eh0 on line 38
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Parse error: syntax error, unexpected T_IF in /in/69Eh0 on line 38
Process exited with code 255.

preferences:
175.5 ms | 1399 KiB | 56 Q