Hello,

I wonder how to install GDChart in Windows XAMPP PHP ?

Thanks.

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

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

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.

line 59 is <html>

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>

You did not close the php block with ?>

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

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.