I'm using the side bar for my website
http://teenstoteens.com
I have a random quote script that I want to use in the side bar. The problem I'm having is that I don't know how to run the script in global.php and show it in the template.
The script in global.php is:
PHP Code:
$query = "SELECT quote " .
"FROM quote " .
"WHERE disp = '1' " .
"ORDER BY RAND() " .
"LIMIT 1";
$results = mysql_query($query)
or die(mysql_error());
while ($row = mysql_fetch_array($results)) {
$quote = $row['quote'];
}
And in the template I have:
HTML Code:
<td class="alt1">$quote</td>
So how do I make it actually show up?
Help please.
This is easy!