The template includes variables in it such as $news, $date, $poster, etc.
In the script, I define these variables, and then echo $template. Problem is, when I call the template, the variables don't turn into their definitions. They just stick around as $news, $poster, etc.
For an example of this, visit http://www.empiregaming.net/news_prog/s ... m_news.php
That is what happens when I call $template.
This is the code in the template field in my table:
Code: Select all
<table cellpadding=3 cellspacing=0 border=0 class='body'><tr><td>$headline</td></tr><tr><td>$news</td></tr><tr><td>Posted by: $poster</td></tr></table>This is the code on my page when I try to call that information.
Code: Select all
<?
include("config.php");
$sql = "select * from AOM_news where id = '1'";
$query = mysql_query($sql);
if(!$query) {
echo mysql_error();
}
if($query) {
while ($data = mysql_fetch_assoc($query)) {
$poster = $dataї'posted_by'];
$headline = $dataї'headline'];
$news = $dataї'news'];
$template = $dataї'template'];
echo $template;
}
}
?>Thanks for any help!