3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php if ((!isset($_POST['mroster'])) || (!isset($_POST['mpass_word']))) { header("Location: show_memloginNEW.html"); exit; } $mysqli = mysqli_connect(localhost,sunrise_sunrise,Xtrem6fTy,sunrise_triessorg) or die("Couldn't select databasea."); echo "mroster"; // use mysqli_real_escape_string to clean the input NEW $mroster = mysqli_real_escape_string($mysqli, $_POST['mroster']); $mpass_word = mysqli_real_escape_string($mysqli, $_POST['mpass_word']); // create and issue the query $sql = "SELECT roster,pass_word FROM mem_auth WHERE roster = '".$mroster."' AND pass_word = '".$mpass_word."'; $result = mysqli_query($mysqli,$sql) or die(mysqli_error($mysqli)); if (mysqli_num_rows($result) == 1){ while ($info = mysqli_fetch_array($result)) { $roster = stripslashes($info['roster']); $pass_word = stripslashes($info['pass_word']); } $connection = mysql_connect(localhost,sunrise_sunrise,Xtrem6fTy); $db = mysql_select_db(sunrise_triessorg, $connection) or die("Couldn't select databasea."); $sql = "SELECT * FROM mem_auth WHERE roster = \"$mroster\" AND pass_word = (\"$mpass_word\") ";$result = mysql_query($sql) or die ("Can't execute query."); $num = mysql_numrows($result); while ($row = mysql_fetch_array($result)) { $rostera = $row['roster']; echo $rostera; } if ($num == 0) { echo "Your information does not match that which is on file, please try again" ; exit; } else { session_start(); session_register('valid'); $valid = "yes"; } //$datea = (date); $dttm = (date ("Y-m-d H:i:s")); $today = (date ("M j,Y")); $todayB = (date ("Y-m-d")); //$connection = mysql_connect(tri-ess-org,sunrise_sunrise,Xtrem6fTy); $connection = mysql_connect($host,$user,$password); $db = @mysql_select_db($db_name, $connection) or die("Couldn't select databaseb."); $ip = $REMOTE_ADDR; $sql = "INSERT INTO member_login (login_Roster, login_Time, ip) VALUES ('$rostera','$dttm','$ip')"; mysql_query($sql); $sql = "SELECT * FROM member WHERE roster LIKE '$Mroster' "; $result = @mysql_query($sql,$connection) or die("Couldn't execute query."); while ($row = mysql_fetch_array($result)) { $first = $row['first']; $rostera = $row['roster']; $doe = $row['doe']; } echo "Today is $today"; ob_end_flush(); ?>
Output for 5.4.0 - 5.4.20
Parse error: syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING) in /in/p6kb5 on line 27
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /in/p6kb5 on line 27
Process exited with code 255.