NVDW
07-12-2005, 11:59 PM
Hi,
this is the test.php code:
<?php
include("news_config.php");
$result = mysql_query("SELECT * FROM news WHERE newsid='$newsid' ",$connect);
echo "<table width='440' border='0' cellspacing='0' cellpadding='0'>";
while($myrow = mysql_fetch_assoc($result))
{
echo "<tr>";
echo "<td colspan='4'><img src='images/arrow2.gif' width='26' height='26'><img src='images/tutheaders/news.gif' width='414' height='26'></td>";
echo "</tr>";
echo "<tr bgcolor='#F0F0F0'>";
echo "<td colspan='4'></td>";
echo "</tr>";
echo "<tr>";
echo "<td width='75' rowspan='2'><img src='images/news.gif' width='75' height='75'></td>";
echo "<td width='10' rowspan='2' valign='top' bgcolor='#FFFFFF' class='style'><div align='left'></div></td>";
echo "<td width='320' height='20' bgcolor='#FFFFFF' class='style2'><div align='left'>";
$txt1 = $myrow['title'];
$txt2 = $myrow['dtime'];
echo $txt1 . " (" . $txt2 . ")";
echo "</div></td>";
echo "<td width='10' rowspan='2' valign='middle' bgcolor='#FFFFFF'></td>";
echo "</tr>";
echo "<tr>";
echo "<td bgcolor='#FFFFFF' class='style1'>";
echo $myrow['text2'];
echo "</td>";
echo "</tr>";
echo "<tr bgcolor='#F0F0F0'>";
echo "<td colspan='4'></td>";
echo "</tr>";
echo "<tr bgcolor='#FFFFFF'>";
echo "<td colspan='4'></td>";
echo "</tr>";
echo "</table>";
}
?>
And this is the index.php where the the test.php should include:
<td width="440" rowspan="17" valign="top"><table width="440" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<?php include("test.php") ?>
</td>
</tr>
All the other includes work but this one doesn't, could be it that it has to do with the fact that test.php includes news_config.php?
If it does or if it doesn't can anyone help me out with this? Thank you
this is the test.php code:
<?php
include("news_config.php");
$result = mysql_query("SELECT * FROM news WHERE newsid='$newsid' ",$connect);
echo "<table width='440' border='0' cellspacing='0' cellpadding='0'>";
while($myrow = mysql_fetch_assoc($result))
{
echo "<tr>";
echo "<td colspan='4'><img src='images/arrow2.gif' width='26' height='26'><img src='images/tutheaders/news.gif' width='414' height='26'></td>";
echo "</tr>";
echo "<tr bgcolor='#F0F0F0'>";
echo "<td colspan='4'></td>";
echo "</tr>";
echo "<tr>";
echo "<td width='75' rowspan='2'><img src='images/news.gif' width='75' height='75'></td>";
echo "<td width='10' rowspan='2' valign='top' bgcolor='#FFFFFF' class='style'><div align='left'></div></td>";
echo "<td width='320' height='20' bgcolor='#FFFFFF' class='style2'><div align='left'>";
$txt1 = $myrow['title'];
$txt2 = $myrow['dtime'];
echo $txt1 . " (" . $txt2 . ")";
echo "</div></td>";
echo "<td width='10' rowspan='2' valign='middle' bgcolor='#FFFFFF'></td>";
echo "</tr>";
echo "<tr>";
echo "<td bgcolor='#FFFFFF' class='style1'>";
echo $myrow['text2'];
echo "</td>";
echo "</tr>";
echo "<tr bgcolor='#F0F0F0'>";
echo "<td colspan='4'></td>";
echo "</tr>";
echo "<tr bgcolor='#FFFFFF'>";
echo "<td colspan='4'></td>";
echo "</tr>";
echo "</table>";
}
?>
And this is the index.php where the the test.php should include:
<td width="440" rowspan="17" valign="top"><table width="440" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<?php include("test.php") ?>
</td>
</tr>
All the other includes work but this one doesn't, could be it that it has to do with the fact that test.php includes news_config.php?
If it does or if it doesn't can anyone help me out with this? Thank you