HI
how i can pass array to a second page
if($report==1){
?>
<p><img id="myclass123" src='onetwolitre.php?startDate=<?php echo urlencode($startDate)?>
&endDate=<?php echo urlencode($endDate)?>&auto=<?php echo urlencode($auto)?>
&netw=<?php echo urlencode($netw)?>&ser=serialize($ser)?>'/></p>
<?php
}
$ser is array
and in the second page i have this:
......
$ser = unserialize( $ser);
$db=mysql_pconnect("localhost:3306","root","root");
mysql_select_db("campion",$db);
$endDate2=date( 'Y-m-d', strtotime( $endDate2 ) );
$sql = "SELECT DATE_FORMAT(tran_date,'%d')as datei,unit_serial,sum(unit_qty)*1 as total,account_no,pulse_channel,unit_name FROM count_transactions
WHERE DATE(tran_date) BETWEEN '$startDate' AND '$endDate' and unit_serial=$netw and account_no=$auto and unit_name='Litres' and pulse_channel IN($ser)
GROUP BY DATE(tran_date)";
$result = mysql_query($sql);
$num=mysql_num_rows($result);
$somme=array();
$jour=array();
while($row = mysql_fetch_array($result)){
$somme[]=$row[total];
$jour[]=$row[datei];
}
$num=mysql_num_rows($result);
include("../css/phplot.php");
if(preg_match('/(?i)msie [1-8]/',$_SERVER['HTTP_USER_AGENT'])) {
$graph =& new PHPlot(750,350);
}
......
means pulse_channel must be in the array ...to have a graph..
if there is 3 values in the array then the pulse channel will be 1 2 3
thanks