I have the following code in my script and it's giving a syntax error at line *** when using the password function. My password in the mysql database is encrypted using the password function itself and I want to verify the input password against my database password. PLEASE HELP
[code=php]
if (isset($_POST["password"])) $password = @$_POST["password"];
if (($login != "") && ($password != "")) {
$conn = mysql_connect(" localhost", "root", "root");
mysql_select_db ("bnk_guarantee ");
$sql = "select `Usr_Passwd` from `user` where `Usr_Login` = '" .$login ."' and `Usr_Status` = 'Active' ";
$res = mysql_query($sq l, $conn) or die(mysql_error ());
$row = mysql_fetch_ass oc($res) or $row = array(0 => "");;
if (isset($row)) reset($row);
*** $pass =password($pass word);
if (isset($passwor d) && ($pass == trim(current($r ow)))) {
$_SESSION["logged_in"] = true;
[/code]
[Please use CODE tags when posting source code. Thanks! --pbmods]
[code=php]
if (isset($_POST["password"])) $password = @$_POST["password"];
if (($login != "") && ($password != "")) {
$conn = mysql_connect(" localhost", "root", "root");
mysql_select_db ("bnk_guarantee ");
$sql = "select `Usr_Passwd` from `user` where `Usr_Login` = '" .$login ."' and `Usr_Status` = 'Active' ";
$res = mysql_query($sq l, $conn) or die(mysql_error ());
$row = mysql_fetch_ass oc($res) or $row = array(0 => "");;
if (isset($row)) reset($row);
*** $pass =password($pass word);
if (isset($passwor d) && ($pass == trim(current($r ow)))) {
$_SESSION["logged_in"] = true;
[/code]
[Please use CODE tags when posting source code. Thanks! --pbmods]
Comment