Hvor er der headers i denne php?
Hej.Har dette menu script, og min php bliver ved med at sige at der bliver header information er blevet sendt i denne fil, jeg ved bare ikke hvor.
Den nævner denne linie:
echo "<tr><td height=\"25\" onmouseover=\"this.style.backgroundImage='url(pic/menuon.jpg)'\" style=\"CURSOR:pointer;background-image:url('pic/menuoff.jpg');\" onclick=\"location.href='".$row['link']."';\" onmouseout=\"this.style.backgroundImage='url(pic/menuoff.jpg)'\" border=\"1\"><p>".$row['text']."</p></td></tr>";
Bliver der sendt header information her?..
Resten af fil kilden:
<?PHP
if(!isset($_SESSION['user_access']))
{
echo "
<!--Mainmenu start-->
<table width=\"100%\" height=\"0%\" class=\"table-menu\">
<tr>
<td height=\"25\" style=\"background-image:
url('pic/menutop.jpg')\" align=\"center\"><p class=\"menu\">Menu</p></td>
</tr> ";
$query = mysql_query("SELECT * FROM menu where showto = 1 ORDER BY sort,text") or die(mysql_error());
while ($row = mysql_fetch_assoc($query)) {
$hvor = substr($_SERVER['REQUEST_URI'], 1, 999);
if($hvor == $row['link'])
{
echo "<tr>
<td height=\"25\" onclick=\"location.href='".$row['link']."'\"><p>".$row['text']."</p></td>
</tr>";
}
else
{
echo "<tr>
<td height=\"25\" onmouseover=\"this.style.backgroundImage='url(pic/menuon.jpg)'\"
style=\"CURSOR:pointer;background-image:
url('pic/menuoff.jpg');\" onclick=\"location.href='".$row['link']."';\"
onmouseout=\"this.style.backgroundImage='url(pic/menuoff.jpg)'\" border=\"1\"><p>".$row['text']."</p></td>
</tr>";
}
}
echo'</table>
<!--Mainenu end-->';
}
elseif(isset($_SESSION['user_access']))
{
if($_SESSION['user_access'] >= 2)
{
echo '</td></tr><tr><td>';
echo "
<!--Mainmenu start-->
<table width=\"100%\" height=\"0%\" class=\"table-menu\">
<tr>
<td height=\"25\" style=\"background-image:
url('pic/menutop.jpg')\" align=\"center\"><p class=\"menu\">Elver Menu</p></td>
</tr>";
$query = mysql_query("SELECT * FROM menu where showto = 2 ORDER BY sort,text") or die(mysql_error());
while ($row = mysql_fetch_assoc($query)) {
$hvor = substr($_SERVER['REQUEST_URI'], 1, 999);
if($hvor == $row['link'])
{
echo "<tr>
<td height=\"25\" onclick=\"location.href='".$row['link']."'\"><p>".$row['text']."</p></td>
</tr>";
}
else
{
echo "<tr>
<td height=\"25\" onmouseover=\"this.style.backgroundImage='url(pic/menuon.jpg)'\"
style=\"CURSOR:pointer;background-image:
url('pic/menuoff.jpg');\" onclick=\"location.href='".$row['link']."';\"
onmouseout=\"this.style.backgroundImage='url(pic/menuoff.jpg)'\" border=\"1\"><p>".$row['text']."</p></td>
</tr>";
}
}
echo "</table>
<!--Mainenu end-->";
}
if($_SESSION['user_access'] == 3)
{
echo '</td></tr><tr><td>';
echo "
<!--Mainmenu start-->
<table width=\"100%\" height=\"0%\" class=\"table-menu\">
<tr>
<td height=\"25\" style=\"background-image:
url('pic/menutop.jpg')\" align=\"center\"><p class=\"menu\">Co. Admin</p></td>
</tr>";
$query = mysql_query("SELECT * FROM menu where showto = 3 ORDER BY sort,text") or die(mysql_error());
while ($row = mysql_fetch_assoc($query)) {
$hvor = substr($_SERVER['REQUEST_URI'], 1, 999);
if($hvor == $row['link'])
{
echo "<tr>
<td height=\"25\" onclick=\"location.href='".$row['link']."'\"><p>".$row['text']."</p></td>
</tr>";
}
else
{
echo "<tr>
<td height=\"25\" onmouseover=\"this.style.backgroundImage='url(pic/menuon.jpg)'\"
style=\"CURSOR:pointer;background-image:
url('pic/menuoff.jpg');\" onclick=\"location.href='".$row['link']."';\"
onmouseout=\"this.style.backgroundImage='url(pic/menuoff.jpg)'\" border=\"1\"><p>".$row['text']."</p></td>
</tr>";
}
}
echo" </table>
<!--Mainenu end-->";
}
if($_SESSION['user_access'] == 4)
{
echo '</td></tr><tr><td>';
echo "
<!--Mainmenu start-->
<table width=\"100%\" height=\"0%\" class=\"table-menu\">
<tr>
<td height=\"25\" style=\"background-image:
url('pic/menutop.jpg')\" align=\"center\"><p class=\"menu\">Admin</p></td>
</tr>";
$query = mysql_query("SELECT * FROM menu where showto = 4 ORDER BY sort,text") or die(mysql_error());
while ($row = mysql_fetch_assoc($query)) {
$hvor = substr($_SERVER['REQUEST_URI'], 1, 999);
if($hvor == $row['link'])
{
echo "<tr>
<td height=\"25\" onclick=\"location.href='".$row['link']."'\"><p>".$row['text']."</p></td>
</tr>";
}
else
{
echo "<tr><td height=\"25\" onmouseover=\"this.style.backgroundImage='url(pic/menuon.jpg)'\" style=\"CURSOR:pointer;background-image:url('pic/menuoff.jpg');\" onclick=\"location.href='".$row['link']."';\" onmouseout=\"this.style.backgroundImage='url(pic/menuoff.jpg)'\" border=\"1\"><p>".$row['text']."</p></td></tr>";
}
}
echo "</table>
<!--Mainenu end-->";
}
}
else
{
echo 'ERROR';
}
?>
