0

hi frens

I am trying to pass array in $_SESSION from the abc.php to generatepdf.php. the pdf is not getting generated after i wrote this part of code.

this is in generatepdf.php

foreach($_SESSION['refcode'] as $temp)
{
	$refcode[]=$temp;
}

foreach($_SESSION['description'] as $temp)
{
	$description[]=$temp;
}

foreach($_SESSION['unit'] as $temp)
{
	$unit[]=$temp;
}

foreach($_SESSION['quantity'] as $temp)
{
	$quantity[]=$temp;
}

foreach($_SESSION['rate'] as $temp)
{
	$rate[]=$temp;
}

foreach($_SESSION['total'] as $temp)
{
	$total[]=$temp;
}

for($i=0;$i<=count($_SESSION['quantity']);$i++)
{
	$pdf->Cell(13,7,$i+1,1);
	$pdf->Cell(30,7,$refcode[$i],'TRB');
	$pdf->Cell(60,7,$description[$i],'TRB');
	$pdf->Cell(10,7,$unit[$i],'TRB');
	$pdf->Cell(10,7,$quantity[$i],'TRB');
	$pdf->Cell(30,7,$rate[$i],'TRB');
	$pdf->Cell(30,7,$total[$i],'TRB',1);

}

any idea, where i am going wrong??
any suggestions most appreciated.

thanks

Edited by puvi: n/a

2
Contributors
2
Replies
4
Views
6 Years
Discussion Span
Last Post by puvi
0

hey paulrajj, thanks for the reply.

i had included session_start(), did not have any output or echo before header tag, but even then i had this problem.

i tried lot many things but in vain, lastly, i had a backup of last working version fortunately, just replaced it.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.