I CANT SPOT THE MISTAKE BELOW IN AN IMG
TAG CALLING A GRAPH SCRIPT. DOES ANYONE
DETECT WHAT THE PROBLEM MIGHT BE?
In myimage.php, here are the data array lines:
INSTEAD OF THE GRAPH, THIS TEXT APPEARS IN
THE BROWSER WINDOW (exactly this text):
&$a2=44&$a3=33 ?>
THE GRAPH IS RENDERED FINE IF I DEFINE "BOB"
"CAROL" AND "ALICE" INSIDE myimage.php
ITSELF. BUT OF COURSE, I NEED TO PASS DATA
TO IT FROM OUTSIDE THE SCRIPT (AND I DON'T
HAVE ACCESS TO A DATA BASE ON MY CHEAPY SITE).
I DON'T KNOW HOW TO GENERATE A TEMPORARY,
RANDOMLY NAMED FLAT TEXT FILE TO WRITE/READ TO,
WHICH I PRESUME IS THE OTHER ALTERNATIVE.
THIS METHOD ABOVE SEEMS BEST FOR MY SMALL
NUMBER OF DATA POINTS (24). ANYONE SEE THE
MISTAKE ABOVE?
got this example from VHgraph home page:
got this example from jpgraph home page:
TAG CALLING A GRAPH SCRIPT. DOES ANYONE
DETECT WHAT THE PROBLEM MIGHT BE?
Code:
$BOB= 54 ;
$CAROL= 44 ;
$ALICE= 33 ;
...
$height =640;
$width =480;
<IMG
SRC="myimage.php?a1=<?echo $BOB ?>&a2=<?echo $CAROL?>&a3=<?echo $ALICE?>"
height="<? echo $height ?>"
width="<? echo $width ?>"
>
In myimage.php, here are the data array lines:
Code:
$graph->y_data['alpha'] = array(a1,a2,a3...);
$graph->y_data['outline'] = array(a1,a2,a3...);
INSTEAD OF THE GRAPH, THIS TEXT APPEARS IN
THE BROWSER WINDOW (exactly this text):
&$a2=44&$a3=33 ?>
THE GRAPH IS RENDERED FINE IF I DEFINE "BOB"
"CAROL" AND "ALICE" INSIDE myimage.php
ITSELF. BUT OF COURSE, I NEED TO PASS DATA
TO IT FROM OUTSIDE THE SCRIPT (AND I DON'T
HAVE ACCESS TO A DATA BASE ON MY CHEAPY SITE).
I DON'T KNOW HOW TO GENERATE A TEMPORARY,
RANDOMLY NAMED FLAT TEXT FILE TO WRITE/READ TO,
WHICH I PRESUME IS THE OTHER ALTERNATIVE.
THIS METHOD ABOVE SEEMS BEST FOR MY SMALL
NUMBER OF DATA POINTS (24). ANYONE SEE THE
MISTAKE ABOVE?
got this example from VHgraph home page:
Code:
<IMG SRC="plot.php3?param1=v1¶m2=v2">
got this example from jpgraph home page:
Code:
<img src="myimg.php?d1=2&d2=7&d3=12" border=0>