Code: Select all
require('mysql.inc.php');
class ajValidateUser extends ajMysqlConnectthen i call the class in a do_login.php page, the code for do_login.php
Code: Select all
session_start();
require('inc/validateUser.inc.php');
$validate = new ajValidateUser;
$validate->CheckUserPass($_POST['username'], $_POST['password']);
if ($validate->error && $validate->errorId)
{
'Error: '.$validate->error.'<br>';
'Errror ID: '.$validate->errorId.'<br>';
}
echo 'userid: '.$_SESSION['user_id'];
echo 'username: '.$_SESSION['username'];what i want done is when do_login.php is opened it takes the posted username and password and sends them to a class that checks them from a database and that class is a extension of a class that connects to the mysql database. how should i go about doing that?