I believe you may have a typo in your code
$s = "select * from usertable where name = 'name' && passoword = '$pass'";
I assume that passoword should be password. Also, name should be $name
$s = "select * from usertable where name = '$name' && password = '$pass'";
As others have suggested, your code is vulnerable to SQL injection and should NOT be used in production.