$stmt = $mysqli->prepare(\'select Un from member where Lock = ? and Activated = ?\');
$stmt -> bind_param(\"ss\", \'N\', \'Y\');//This line gave the error
$stm
Call to a member function bind_param() on a non-object means that $stmt, which you're trying to call bind_param on, is not an object. Why is it not an object? Because $mysqli->prepare did not return an object. Why did it not return an object?
mysqli_prepare()returns a statement object orFALSEif an error occurred.
http://www.php.net/manual/en/mysqli.prepare.php
So that means an error must have occurred. You should turn on error_reporting, which will probably tell you, or examine $mysqli->error(), which may tell you as well.