Fatal Error: sql

Discussion in 'Setting-up protection' started by cheatsheetguys, Apr 7, 2004.

  1. Hello,

    I am receiving the following error after signing in as a test user:

    Fatal error: Call to undefined function: sql_query() in /home/virtual/site97/fst/var/www/html/mainfile.php on line 523

    I am attempting to access a php module that needs to be locked down to certain membership levels. The php include is in the index.php file of the module.

    Any help is greatly appreciated. The amember software so far has installed with no problems.

    Thanks,
    Dan
  2. I should add that this is the function in mainfile.php that is listed:

    function cookiedecode($user) {
    global $cookie, $prefix, $db, $user_prefix;
    $user = base64_decode($user);
    $cookie = explode(":", $user);
    $sql = "SELECT user_password FROM ".$user_prefix."_users WHERE
    username='$cookie[1]'";
    $result = $db->sql_query($sql);
    $row = $db->sql_fetchrow($result);
    $pass = $row[user_password];
    if ($cookie[2] == $pass && $pass != "") {
    return $cookie;
    } else {
    unset($user);
    unset($cookie);
    }
    }

    And specifically line 523 is:

    $result = $db->sql_query($sql);

    thanks,
    Dan

Share This Page