Function Error using authentication php page

  1. I am using php7.4
  2. This begins with a php page titled auth001.php. I input a login and password
  3. The page takes me to a page called auth003.php which is the code below. I altered the names somewhat for security
  4. When the page activates I get FUNCTION ups_database1.old_password does not exist
    Its asking for ups_database1.old_password. Does this mean theres a problem with my initial sql statemnt?
<?php

//check for required fields from the form

if ((!$_POST['user']) || (!$_POST['password'])) {

  header("Location: auth001.php");   
    exit;

}

//connect to server and select database
$conn = mysqli_connect("localhost", "ups_admin", "mbNrttg30Ut4") or die(mysqli_error($conn));  

mysqli_select_db($conn,"ups_database1")  or die(mysqli_error($conn));

//create and issue the query

$sql = "select last from admin where user = '$_POST[user]' AND password = old_password('$_POST[password]')";

FUNCTION ups_database1.old_password does not exist

You already have a thread for this, with some replies. Don’t start new threads for the same problem.

Sponsor our Newsletter | Privacy Policy | Terms of Service