View Single Post
  #1 (permalink)  
Old November 21st, 2012, 03:50 AM
internetpirate11 internetpirate11 is offline
Authorized User
Points: 64, Level: 1
Points: 64, Level: 1 Points: 64, Level: 1 Points: 64, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2012
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default call to undefined function

call to undefined function cmpfx().. what does that mean?

if (isset($_SESSION["admin"])) redirect("home.php");

if (!empty($_POST)) {
//$rs = getconfigvar("admin_username,admin_password");
$sql="select * from user_master where 'user_name'='admin'";
// $sql="select * from user_master where active=1 and user_type in (1,2) and user_name='".pdbfx("username")."'";
$cmd = mysql_query($sql);
$rs = mysql_fetch_array($cmd);
/*echo $rs["password"]."-".pdbfx("password");
echo cmpfx($rs["password"], pdbfx("password"));
echo $sql;
die;*/
if (cmpfx($rs["user_name"], $_POST["username"]) && cmpfx($rs["password"], md5($_POST["password"]))) {
$_SESSION["admin"] = $_POST["username"];
$_SESSION["user_type"] =$rs["user_type"];
$_SESSION["user_id"] =$rs["user_id"];

redirect("home.php");
}
else {
setErr("<div class='response-msg error ui-corner-all'> <span>Invalid Username or Password </span></div>");
redirect("index.php");
}
}

Last edited by internetpirate11; November 21st, 2012 at 04:12 AM..
Reply With Quote