<?php
$con=mysqli_connect("db4free.net","thesis","tribiana7584913","library");
$password = $_POST["password"];
$username = $_POST["username"];
$statement = mysqli_prepare($con, "SELECT * FROM user_tbl where user_name = ? AND password = ? AND account_ID in (1,2) and status = 'Active'");
mysqli_stmt_bind_param($statement, "ss", $username,$password);
mysqli_stmt_execute($statement);
mysqli_stmt_store_result($statement);
mysqli_stmt_bind_result($statement,$userID,$username,$password,$emailadd,$accountID,$status);
$user = array();
while(mysqli_stmt_fetch($statement)){
$user[userID] = $userID;
$user[username] = $username;
$user[password] = $password;
$user[emailadd] = $emailadd;
$user[accountID] = $accountID;
}
echo json_encode($user);
mysqli_stmt_close($statement);
mysqli_close($con);
?>
preferences:
54.97 ms | 402 KiB | 5 Q