Quote:
Originally Posted by larryd
Can you tell me what I'm doing wrong here? This script should be returning and printing out the id field from all entries in the database yet it only returns and prints the last id.
http://vb.newcelica.org/test.php
Code:
$navbits = construct_navbits(array('' => 'Test Page'));
$navbar = render_navbar_template($navbits);
$templater = vB_Template::create('TEST');
$templater->register_page_templates();
$templater->register('navbar', $navbar);
// ###### YOUR CUSTOM CODE GOES HERE #####
include(config.php);
$result = mysql_query("SELECT * FROM dynotable WHERE name <> '' ORDER BY name ASC",$dynodb);
while ($row = mysql_fetch_array($result)) {
$id = $row["id"];
$output = "<table><tr><td>id</td><td>$id</td></tr></table>";
$templater->register('output', $output);
print_output($templater->render());
}
?>
|
Once you use print_output, that is the end of the page rendering. You only use print_output when you are completely done and ready to render the page.