Here is a tricky one that im having issues with...
I have a page called events.php that has a include to query sql and pull events from the database after todays date and include the artist information from a include file. here is the code. The events page has a include of events2.php...
<?php
$con = mysql_connect("hostname","username","password");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("database", $con);
$today = date("Y-m-d");
$result = mysql_query("SELECT * FROM events where Date > '$today' limit 0,4");
while ($row = mysql_fetch_array($result)) {
echo "<?include ('";
echo $row['IncFile'];
echo "');?>";
echo '<div class="clear"></div><BR>';
}
mysql_close($con);
?>
</td>
</tr>
</table>
the above creates the name of the include file to include. And it does so when viewing the source code for event.php it shows the following
<?include ('events/Event-Showdown.inc');?><div class="clear"></div><BR>
<?include ('events/Event-TOW.inc');?><div class="clear"></div><BR>
<?include ('events/Event-Jamie-Davis.inc');?><div class="clear"></div><BR>
<?include ('events/Event-Postal-Monkey.inc');?><div class="clear"></div><BR>
However it doesnt show the data within such as below. all it shows is a blank. I would asume that insead of seeing the above code I should be seeing the below within the events.php what am i doing wrong.
<!-- Showdown -->
<? $thisevt = event('June 30th','Showdown','http://www.myspace.com/ShowdownOrlandoFL',
'Showdown plays Country music, and a little <br>sprinkle off Classic Rock here and there.<br>
<br>Members:
Willy Bouton: Bass Guitar and Vocals
Danny Evans: Drums
Bill Posten: Keyboards
Billy Varnes: Lead Guitar and Vocals<br>
<em>Excerpt from the <a href="http://www.myspace.com/ShowdownOrlandoFL" target="new_frame">Showdown Website.</a></em>',
'Showdown.png','image','yes');
echo $thisevt;
?>
<!-- END Showdown -->