1.11M Members

gdchart

 
0
 

Hello,

I wonder how to install GDChart in Windows XAMPP PHP ?

Thanks.

 
0
 

If you have installed PEAR, use the package installer that comes with it.

 
0
 

I don't have PEAR installed yet. Nevermind, I use other alternatives like google chart.

I have this:

chart.php

<html>
  <head>
    <script type="text/javascript" src="https://www.google.com/jsapi"></script>
    <script type="text/javascript">
      google.load("visualization", "1", {packages:["corechart"]});
      google.setOnLoadCallback(drawChart);
      function drawChart() {
        var data = google.visualization.arrayToDataTable([
          ['Year', 'Sales', 'Expenses'],
          ['2004',  1000,      400],
          ['2005',  1170,      460],
          ['2006',  660,       1120],
          ['2007',  1030,      540]
        ]);

        var options = {
          title: 'Company Performance',
          hAxis: {title: 'Year',  titleTextStyle: {color: 'red'}}
        };

        var chart = new google.visualization.AreaChart(document.getElementById('chart_div'));
        chart.draw(data, options);
      }
    </script>
  </head>
  <body>
    <div id="chart_div" style="width: 900px; height: 500px;"></div>
  </body>
</html>

It's a php file. Those codes are inside <?php ?>
I wonder why I get this error:

Parse error: syntax error, unexpected '<' in C:\xampp\htdocs\Innovation\script_shop\adsmgt.php on line 59

 
0
 

Look at or before line 59. Something is wrong there. I can't say if you don't show your code, you should know that by now.

 
0
 

line 59 is <html>

 
0
 

This is the code above it:

while($row2 = mysql_fetch_array($result2))
{
echo "<br>".$row2['date']."&nbsp&nbsp&nbsp".$row2['time'];

}

//php_info();

<html>
  <head>

Parse error: syntax error, unexpected '<' in C:\xampp\htdocs\Innovation\script_shop\adsmgt.php on line 57

line 57 is <html>

 
0
 

You did not close the php block with ?>

 
0
 

I actually did. Right after </html> ?>

 
0
 

You need to close it before <html>
You can't just mix HTML and PHP at will.

You
This article has been dead for over six months: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article