$email
has data; not empty but
!empty($email)
<< false
and !empty('$email')
<< true
But I have some problems
Parse error syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting T_STRING or T_VARIABLE or '$' in
$email
has data; not empty but
!empty($email)
<< false
and !empty('$email')
<< true
But I have some problems
Parse error syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting T_STRING or T_VARIABLE or '$' in
You must be using a version of PHP before 5.5. Per the manual:
Prior to PHP 5.5, empty() only supports variables; anything else will result in a parse error.
-http://php.net/manual/en/function.empty.php
The reason you are getting this is because anything single quotes is a string. Change it to:
if(!empty($email) and !empty($password))
and you should be good to go.
The issue and error message can be seen here, https://3v4l.org/EgfFb. I'd also recommend updating your PHP version because based on the error you are using <= 5.2.17.