Hi i have created a login form and want to check the details against whats in the database!
When entering the password i encrypted it so in order to chexk it i need to decrypt it the code im using to this give me the error:
PHP Notice: Use of undefined constant Password - assumed 'Password' PHP Notice: Undefined index: SubPass
the code is:
$db = odbc_connect($dbsource, $dbuser, $dbpass) or die(odbc_errormsg);
$Q01 = "SELECT Password, ENCRYPT('$POST[Password]') as SubPass
FROM $dbtable
WHERE UserName='$POST[UserName]'";
$R01 = odbc_exec($db,$Q01) or die("Bad Q01:".mysql_error());
odbc_fetch_into($R01, $Info);
if($_POST[Password] != $Info['SubPass'])
{
$ErrorCode = "Your Paswword is Incorect";
//ViewHeader();
include('home.php');
//ViewFooter();
exit;
}
any help would be much appreciated!!!
thanx!!!