I'm confused? Did u check the top of the page where it says <?php ? Straight after the word php, if there is a space (black character) you will have a problem. That's what your post says, so you would already know that. Can you post the codefor the jpgraph? If it's too big, post your page code (mainly where your header is) and then have a look in the jpgraph code for the word header and post surrounding code for that.
Thanks for your reply. This is my graph code and this is working.
[PHP]
<?php
include ("../rainfall_ITI/jpgraph2.3/src/jpgraph.php");
include ("../rainfall_ITI/jpgraph2.3/src/jpgraph_bar.php");
include 'dbconnect.php';
$sql = mysql_query("SELECT Rainfall,Date FROM rainfall WHERE Station_ID = 'st1 St 02' LIMIT 0, 10") or die(
mysql_error());
while($row = mysql_fetch_array($sql))
{
$i=0;
$Query1 = explode(" ",$row['Date']);
$Query2 = $Query1[0];
$data[] = $row[0];
$leg[] = $Query2[8].$Query2[9];
}
$graph = new Graph(300,300,"auto");// set the size of the image
$graph->SetScale("textint");
$graph->img->SetMargin(40,30,30,60);
//$graph->AdjBackgroundImage(0.4,0.7,-1); //setting BG type
//$graph->SetBackgroundImage("linux_pez.png",BGIMG_FILLFRAM E); //adding image
$graph->SetShadow();
$graph->xaxis->SetTickLabels($leg);
$bplot = new BarPlot($data);
$bplot->SetFillColor("darkblue"); // Fill color
// Set up the title for the graph
//$graph->title->Set("Rainfall During last 10 hours"."($Query2)");
$graph->title->Set("Rainfall During last 10 hours");
$graph->title->SetFont(FF_VERDANA,FS_NORMAL,10);
$graph->title->SetColor("darkred");
// Setup X-axis labels
$graph->xaxis->title->Set("Date");
//$graph->xaxis->SetLabelAngle(90);
$graph->yaxis->title->Set("Rainfall(mm)");
$bplot->value->Show();
$bplot->value->SetFont(FF_ARIAL,FS_BOLD);
$bplot->value->SetAngle(45);
$bplot->value->SetColor("black","navy");
$graph->Add($bplot);
$graph->Stroke(); ?>
[/PHP]
when i put the above code in to my table it gave an error
[PHP]
<table>
<tr>
<td width="60"> </td>
<td>
/* jp graph code add here*/
</td>
</tr>
</table>
[/PHP]