<?php
//Require the Class
require_once("ponline.php");
//Creates a child class so as to configure the variables
class online extends ponline{
function online(){
$this -> sql_user = "user";
$this -> sql_password = "123456789;
$this -> sql_dbname = "";
$this -> sql_table = "ponline_";
$this -> ponline();
}
}
//Creats a new instance of the class
$online = new online;
//Check for table
if ($online -> table_exists() == false){
echo "Table not found!";
//Creates the table
$online-> create_table(true);
}
else{
echo "Table exists";
}
echo "<hr>";
//Updates the list and prints the number of users online
print_r($online -> update_list());
echo "<hr>";
//Query numbers
echo "No. Queries: $online->sql_query_no<br><hr>";
//Error Messages
print_r($online -> error("all"));
?>
|