I have a log-in page that when clicked goes to my admin page that is created by the ADMIN class. I want to verify the log-in information using a "VerifyLogin" function that I've created inside the ADMIN class. Im using a MySQL database to store the usernames and passwords.
Here are the errors:
Warning: Missing argument 1 for verifylogin() in /home/www/aandibalancing/admin/include/adminclass.inc on line 73
Warning: Missing argument 2 for verifylogin() in /home/www/aandibalancing/admin/include/adminclass.inc on line 73
Could not connect
Here is the function:
function VerifyLogin($employeeId,$password)
{
include('databaseconnectionfile.php');
$employeequery = "Select count(*) from employees where employeeid = '$employeeid' and password='$password'";
$employeeresult = mysql_query($employeequery);
if(!$employeeresult)
{
echo 'Please Try Again Later.';
exit();
}
$count = mysql_result($employeeresult,0,0);
if($count>0)
{
echo 'Connection is okay';
}
else
{
echo 'Could not connect';
}
}
Im new to classes and functions so dont be too impatient with me Im not even sure if this is at all possible. I need to take this a step further I'd like to create an if statement that says if the login is bad display the login box again and if the login is good display the admin content. But really just need help getting passed this step first. Or if you'd like to suggest another method that would be okay too 🙂