I'm using
https://vborg.vbsupport.ru/showthread.php?t=62164 to creat my own custom page. I've changed some parts thoo. I use this code instead.
Code:
eval('$HTML = "' . fetch_template($templatename) . '";');
eval('print_output("' . fetch_template($shelltemplatename) . '");');
And I've been playing around a littlebit to learn.
Code:
if ($_REQUEST['do'] == 'addrequest') {
$templatename = 'job_add_request';
$walle = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "jobs WHERE id = 1");
eval('$test = "'. $walle[test] .'";');
}
Thats what I came up with. It will print out the field "test" from the row with id 1. What if I want to print out all the rows? How do I use a loop in this code?

I would like the $test variable in the template to print out the result from "SELECT * FROM " . TABLE_PREFIX . "jobs". And perhaps some html around the result itself. Like. <div>$test</div><div>$test</div> etc.. Anyone know how to do that?