- I am using php7.4
- This begins with a php page titled auth001.php. I input a login and password
- The page takes me to a page called auth003.php which is the code below. I altered the names somewhat for security
- 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