I tried running this script through Android, but the response is this;
Number of bind variables doesn't match number of fields in prepared statement
I do not know what this means, but my script was just supposed to log the person in if their input info is correct. Then, grab a string from the db and return it back to android. Can someone explain what im doing wrong? And what that error even means?
My script looks like this;
<?php
$db_host = 'localhost:3306';
$db_user = 'root';
$db_pass = '';
$db_name = 'test';
$con = mysqli_connect($db_host,'user',$db_pass,$db_name);
$username = $_POST["username"];
$password = $_POST["password"];
$statement = mysqli_prepare($con, "SELECT * FROM cresidentials WHERE username = ? AND password = ?");
mysqli_stmt_bind_param($statement,"ss",$usermame,$password);
mysqli_stmt_execute($statement);
mysqli_stmt_store_result($statement);
mysqli_stmt_bind_result($statement,$username,$password,$isAdmin);
echo $isAdmin;
?>