<?php
 
    include_once('guestbook.class.php');
 
    
 
    // Add your own session logick here
 
    session_start();
 
    $_SESSION['admin'] = 1;
 
    
 
    if($_SESSION['admin']){
 
        $guestbookAdmin = new guestbookAdmin();
 
        if($guestbookAdmin->createDB())
 
            echo "Database and tables created if they did not already exists";
 
            
 
        if(isset($_REQUEST['del']) && $_REQUEST['del'] == 'true'){
 
            if($guestbookAdmin->destroyTables())
 
                echo "Tables have been destroyed if they existed";
 
        }
 
    } else {
 
        echo "Not admin are you?";
 
    }
 
?>
 
 
 |