I am doing a login page and its throwing up the following error
Parse error: syntax error, unexpected T_BOOLEAN_AND, expecting ‘,’ or ‘)’ in /data/members/paid///**********.co.uk/htdocs/www/admin/login.php on line 47
here is the code
<?
include('../config/db.settings.php');
// username and password present in sql, login OK
if(isset($login_chk))
{
setcookie("user", $uname, time()+3600);
header("location: index.php");
}
// checks if form submittes
if($sumbit) {
// verify username input is alpha numeric
function check_uname($uname)
{
if(!preg_match("/[^a-zA-Z0-9.-??????
]+$/s",$uname))
return TRUE;
else
return FALSE;
}
// verifty password is alpha numeric
function check_upass($upass)
{
if(!preg_match("/[^a-zA-Z0-9.-??????
]+$/s",$upass))
return TRUE;
else
return FALSE;
}
$un_err=0; // reset username error
$up_err=0; // reset password error
$inpuname_err=0; // reset username input error
$inpupass_err=0; // reset password input error
if(!check_uname($uname)) // check username input
{
$inpuname_err_txt = "You have entered characters in the Username field that are not allowed.";
$inpuname_err++;
}
if(!check_upass($upass)) // check password input
{
$inpupass_err_txt = "You have entered characters in the Password field that are not allowed.";
$inpupass_err++;
} // Line 47
if(!isset($inpuname_err && $inpupass_err))
{
$sql_uname = mysql_query("SELECT * FROM users WHERE uname = '$uname'", $dbconn) or die(mysql_error());
$check_un = mysql_fetch_assoc($sql_uname);
if(!isset($check_un))
{
$un_err_txt = "Invalid Username";
$un_err++
}
$sql_upass = mysql_query("SELECT * FROM users WHERE uname = '$uname' AND upass = '$upass'", $db_con) or die(mysql_error());
$check_up = mysql_fetch_assoc($sql_upass);
if(!isset($check_up))
{
$up_err_txt = "Invalid Password";
$up_err++
}
if(!isset($un_err && $up_err) {
header("location: login.php?check=ok");
}
else
{
header("location: login.php");
}
}
}
else
{
I’m pulling my hair out trying to find it