helping jd- with looping through sql data and variables...
PHP Code:
// Hum, Hum vb vars =/
$DB = $DB_site;
//get query vbulletin style.....
$query = $DB->$query("select * from ". TABLE_PREFIX ."affiliates ORDER BY id");
while($results = $DB-> fetch_array($query))
{
$tablecontents .= "<tr><td> $results[name] <td><td> $results[link] </td></tr>";
}
Okay so thats some pretty easy php that loops through every affiliate entry and outputs the name and link into a 2 column table.... now lets build our template....
HTML Code:
<html> <head> </head> <body> <table>
$tablecontents
</table> </body> </html>
Now to finish off the php code.. heres the eval part on the php page:
PHP Code:
//grab template named 'affiliate_template'
eval('print_output("' . fetch_template('Affiliate_Template') . '");');
?>