it took me awhile to fully understand this code and although I can follow the code okay, I feel like this is a round about approach, especially since my provider does not make use of PEAR on their server.
Initially I decided to make a class that uses a method to make a connection to the database with normal php functions and assign that connection to a member of that class and make several other methods that return necessary information from the database.
For example
Code: Select all
$check = $obj->check($username, $password);
if($check == true){ // print page }
else { header("location: login.php"); }Any thoughts or opinions on the subject would be greatly appreciated.