The code is :
<?php
require_once('connection.php');
// Check $username and $password
/*
if(empty($_POST['username']))
{
echo "UserName/Password is empty!";
return false;
}
if(empty($_POST['password']))
{
echo "Password is empty!";
return false;
}
*/
// Define $username and $password
$username=$_POST['username'];
$password=md5($_POST['pass']);
// To protect MySQL injection (more detail about MySQL injection)
$username1 = stripslashes($username);
$password2 = stripslashes($password);
$username3 = mysql_real_escape_string($username);
$password4 = mysql_real_escape_string($password);
$sql="SELECT * FROM $WebsiteUsers WHERE username='$username' and password='$password'";
$result=mysql_query($sql);
// If result matched $username and $password, table row must be 1 row
if( mysql_num_rows($result) ==1){ //get num of rows
$row = mysql_fetch_assoc($result);
if ($password4) == $row['password']
{
session_register("username");
session_register("password");
echo "Login Successful";
return true;
}
else {
echo "Wrong Username or Password";
return false;
}
}
else{
echo "Wrong Username or Password";
return false;
}
?>
Error keeps saying:
Parse error: syntax error, unexpected T_IS_EQUAL in /home/u771046626/public_html/IP/check-user.php on line 36
I've had a look, and cannot find my mistake so I am hoping that people on here can.