I have a page1.php
with image scr="pieGraph.php"
inside it. And in my pieGraph.php
i have a code like this:
session_start();
if(isset($_SESSION['test']))
{
$_SESSION['test'] = $_SESSION['test'];
}
else
{
$_SESSION['test'] = 0;
}
$val1 = $_SESSION['test'];
$val2 = 30;
$val3 = 40;
$val4 = 50;
$val5 = 10;
/* CAT:Pie charts */
/* pChart library inclusions */
include("chart/class/pData.class.php");
include("chart/class/pDraw.class.php");
include("chart/class/pPie.class.php");
include("chart/class/pImage.class.php");
/* Create and populate the pData object */
$MyData = new pData();
$MyData->addPoints(array($val1,$val2,$val3,$val4,$val5),"ScoreA");
$MyData->setSerieDescription("ScoreA","Application A");
/* Render the picture (choose the best way) */
$myPicture->autoOutput("pictures/example.draw2DRingValue.png");
?>
But session in this page doesn't work. Dont know why. Please help guys.