$query = sqlsrv_query("select * from sessions where password='$password' AND username='$username'");
$rows = sqlsrv_num_rows($query);
if ($rows == 1) {
$_SESSION['login_user']=$username;
header("location: profile.php");
} else {
$error = "Username or Password is invalid";
}
Hi, I have this code but it's written in mysql and I want it to work in sqlserver so I changed mysql_query
into sqlsrv_query
and it didn't work properly, and I changed mysql_num_rows
into sqlsrv_num_rows
and it didn't work either so can anyone help me and tell me how to write them please?