Forum Moderators: coopster
What makes it even wierder is that the pages are already executing php to do the browser validation and to pull in different style sheets.
I have tried playing about with different doc types etc but all to no avail.. I was wondering if anyone has had the same problem or any ideas why it may be going wrong..
Cheers
I cant understand it, it is just a completely blank page. Below is the code that i am using, the variables that have been pulled from the database at the top of the page.
<?php include_once("php/top_menu.inc.php");?>
<div id="content">
<div id="main">
<span class="top"></span>
<img src="images/competition_title1.gif" width="210" height="22" class="headingGc" alt="competition">
<p><?=$body_text;?><img src="images/comp_page/<?=$image;?>" border="0"></p>
<span class="bottom"></span> </div>
<div id="compPanel" class="panel">
<span class="top"></span>
<div class="text">
<a href="draw.php"><img src="images/enter_title2.gif" alt="enter the competition" width="150" height="20" border="0" class="headingGC"></a>
<p><a href="draw.php">design your own dot 2 dot </a></p>
</div>
<a href="draw.php"><img src="images/competition_gc.gif" alt="dot 2 dot competition icon" width="95" height="106" border="0" class="image"></a>
<span class="bottom"></span>
</div>
<div id="viewGallery">
<span class="top"></span>
<div class="text">
<a href="gallery.php"><img src="images/browse_title2.gif" alt="browse the gallery" width="150" height="20" border="0" class="headingGC"></a>
<p><a href="gallery.php">see the entries so far </a></p>
</div>
<span class="bottom"></span>
</div>
</div>
<?php include_once("php/footer.inc.php");?>
thanks.
It is almost asif the page cannot parse the php, but i have php includes on the page which work so it must be able to..
I have narrowed down where the problem is to the code below (that pulls the info from the database) but there is nothing wrong with that code. Very strange..
<?
//ini_set("display_errors", "On");
//error_reporting(E_ALL);
require("scripts/db_connect.php");
$query = "SELECT * FROM comp_page ORDER BY ID DESC LIMIT 1";
$result = mysql_query($query) or die('Error, insert query failed');
while($row = mysql_fetch_assoc($result)) {
$body_text = $row["body_text"};
$image = $row["image"};
}
?>
I wonder why it didn't show the errors...
Although display_errors [php.net] may be set at runtime (with ini_set()), it won't have any affect if the script has fatal errors. This is because the desired runtime action does not get executed.
You can always check the log though (see error_log [php.net] and log_errors [php.net]).