Custom Page, Query Database
Posted: 2025-06-11 14:33
What files should I include on a custom page to query the database?
Per the documentation, this is my current code:
I would like to use the sql method which is part of incFunctions.php (line 342) unless there is a better way to query the database. Do I just include incFunctions.php or will it already be included when I include header.php or should I include some other file?
Per the documentation, this is my current code:
Code: Select all
<?php
const PREPEND_PATH = '../';
$hooks_dir = __DIR__;
include("$hooks_dir/../lib.php");
include_once("$hooks_dir/../header.php");
/* grant access to all logged users */
$mi = getMemberInfo();
if(!$mi['username'] || $mi['username'] === 'guest') {
echo "Access denied";
exit;
}
echo "<p>Coming Soon</p>";
include_once("$hooks_dir/../footer.php");