I've fixed it! 😃
I did the query the same as in another example:
$myQuery = 'select * from authorized_users'
."where password='$password' "
." and name='$userid' limit 1";
[/B]
instead of
$myQuery = "select * from authorized_users where name=".$userid." and password=".$password." limit 1";
But it would be really appreciated if some veteran on PHP and MySQL clarified why the first method works and not the second one. If I'm not wrong the simple quotes ('...') used in the first and valid method in '$password' and '$userid' don't allow PHP to interpret $password as a variable, but as a string.
I don't understand why the 2nd method doesn't work even by doing this:
$myQuery = "select * from `authorized_users` where name=$userid and password=$password limit 1";
as $userid and $password should be interpreted as their values when they are between double quotes ("...")
Does anyone have an explanation to this all?