Why this HTML doesn't appear????

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
apek
Forum Commoner
Posts: 96
Joined: Tue Jan 06, 2004 11:19 pm
Location: Holiday Plaza Johor Bahru

Why this HTML doesn't appear????

Post by apek »

i just curious why my HTML code below doesn't appear at browser....can anyone help me???

Code: Select all

<?php
session_start();
include("../inc/config.php");
include("phpchartdir.php");
function query($query, $link, $line, $file)
{
	$result = mysql_query($query);
      if (empty($result) && ini_get('display_errors') == 1)
        {
            echo mysql_error().": ";
            echo mysql_errno()."<br />\n";
            echo $query."<br />\n";
            echo "@ $line in $file\n";
        }
	return $result;
	}
#The data for the pie chart
$data =$_SESSION["firstquarter2"];

#The labels for the pie chart
$labels=$_SESSION["firstquarter"];

//$c->setData($data, $labels);
#Create a PieChart object of size 450 x 240 pixels
$c = new PieChart(650, 440);

#Set the center of the pie at (150, 100) and the radius to 80 pixels
$c->setPieSize(360, 200, 120);

#Add a title at the bottom of the chart using Arial Bold Italic font
$c->addTitle2(Bottom, "Jumlah Kerosakan Mengikut Komponen", "arialbd.ttf");

#Draw the pie in 3D
$c->set3D();

#Use the side label layout method
$c->setLabelLayout(SideLayout);

#Set the pie data and the pie labels
$c->setData($data, $labels);

#Explode the 1st sector (index = 0)
$c->setExplode(0);

#output the chart
header("Content-type: image/png");
print($c->makeChart2(PNG));
session_unset();
?>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<TITLE></TITLE>
</HEAD>
<BODY>
<form name="myform" action="cleanKomponen.php" method="post">
<CENTER>
 <font face="verdana" color="red" size="2"><strong>
Anda dikehendaki menekan butang delete terlebih dahulu sekiranya anda hendak melihat keputusan yang tepat pada 
masa yang akan datang......
 </strong></strong>
 <br><br><br>
 <input style="BACKGROUND-COLOR: #cccccc; BORDER-BOTTOM: #000000 1px solid; BORDER-LEFT: #000000 1px solid; 
BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 1px solid; COLOR: #333333; FONT-FAMILY: Verdana; FONT-SIZE: 
7pt" type="submit" value="DELETE" name="submit">

</center>
</form>
</BODY>
</HTML>
User avatar
markl999
DevNet Resident
Posts: 1972
Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)

Post by markl999 »

The HTML looks ok, so i'm guessing a bug in the PHP bit, try doing
<?php
error_reporting(E_ALL);

and see if any warnings/notices display.
User avatar
apek
Forum Commoner
Posts: 96
Joined: Tue Jan 06, 2004 11:19 pm
Location: Holiday Plaza Johor Bahru

Post by apek »

theres no warning display....
:(
User avatar
markl999
DevNet Resident
Posts: 1972
Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)

Post by markl999 »

Then i'd comment out all the PHP code and make sure the HTML works without it. Then go through the PHP code adding in lines one at a time until you find the line that causes the HTML not to display, that line should be the one causing the problem.
Post Reply