Here is my error:
Parse error: syntax error, unexpected 'Connection' (T_STRING), expecting ',' or ';' in /home/ubuntu/workspace/login.php on line 13
The code:
<?php
// establishing the MySQLi connection
$con = mysqli_connect(“localhost”,”root”,””,”members”);
if (mysqli_connect_errno()) {
echo “MySQLi Connection was not established:” .mysqli_connect_error();
}
// checking the user
if(isset($_POST[‘login’])) {
$email = mysqli_real_escape_string($con,$_POST[’email’]);
$pass = mysqli_real_escape_string($con,$_POST[‘pass’]);
$sel_user = "select * from members where user_email='$email AND user_password='$pass'";
$run_user = mysqli_query($con, $sel_user);
$check_user = mysqli_num_rows($run_user);
if($check_user > 0) {
$_SESSION[‘user_email’] = $email;
echo “<script>window.open(‘home.php’,’_self’)</script>”;
} else {
echo “<script>alert(‘Email or password is not correct, try again!’)</script>”;
}
}
?>