Pretty much all of the content on the site is going to be dynamically generated (php + db backend)
What is the preferred "wordpress way" of passing data to a php template (set up as a template in a wordpress theme)
So the template would be something like
<?php
generate_content_based_on_this_variable(page);
?>
and I'd need to be able to pass it page
for each different page
Edit 1
So I have a page that, for simplicity, looks something like this
Hi everyone, this is page X The content here is generated from a db call:
SELECT * FROM db WHERE page=X
[Spit out db resultset here]
and the template would be something like
<?php
the_content()
$query='SELECT * FROM db WHERE page=X'
$result=$db->execute($query)
foreach($result as $row){
echo $row
}
?>
the_content()
call