Hello,
I am making a login form on my site, and need a little bit of help. I keep receiving an error when I use this script:
<?php
$em = $_REQUEST["email"];
$pa = md5($_REQUEST["password"]);
//connectioninfo hidden
$connectionInfo = array( "UID"=>$uid,
"PWD"=>$pwd,
"Database"=>$databaseName);
$conn = sqlsrv_connect( $serverName, $connectionInfo);
$tsql = "SELECT email, password FROM users WHERE email = $em AND password = $pa";
$stmt = sqlsrv_query( $conn, $tsql);
if($stmt)
{
$ot =
"Hi, " . $em;
}
else
{
$ot =
"<p>Oh, no! My Account is currently unavailable right now, please try again later.</p>";
}
?>
The error I keep getting is:
Oh, no! My Account is currently unavailable right now, please try again later.
Can someone please hel me understand why it is not displaying the Hi, $em message when I login ,and how I may go about fixing it.
Also, just to get this out of the way, yes, I am using the correct login details. :)
Thanks jase