PHP Classes

Problem with a session

Recommend this page to a friend!

      MsDoc Generator  >  All threads  >  Problem with a session  >  (Un) Subscribe thread alerts  
Subject:Problem with a session
Summary:i what to put a session on the page that is transfor to word
Messages:1
Author:Andy
Date:2008-09-12 08:31:32
 

  1. Problem with a session   Reply   Report abuse  
Picture of Andy Andy - 2008-09-12 08:31:32
When i put the session the script give me an error(the....not exist)

<?
session_start();
require_once('clsMsDocGenerator.php');
$doc = new clsMsDocGenerator();

$doc->addImage('http://www.website.nl/db_newswork/logo/websiteKOP.PNG', 600, 90);
$doc->addParagraph(' &nbsp; ');
$doc->addParagraph('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Klantnummer:&nbsp;&nbsp;&nbsp&nbsp;&nbsp;&nbsp; '.$_GET['sid'].'', array('text-align' => '"center"', 'font-size' => '16pt', 'font-weight' => 'bold'));
$doc->addParagraph('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Klantnaam:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '.$_GET[sname].'', array('text-align' => '"center"', 'font-size' => '16pt', 'font-weight' => 'bold'));
$doc->addParagraph('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Rayon:&nbsp;'.$_GET['rid'].'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Omschrijving:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '.$_GET[omsch].'', array('text-align' => '"center"', 'font-size' => '16pt', 'font-weight' => 'bold'));
$doc->addParagraph(' &nbsp; ');
$doc->startTable();
$header = array('Pr', 'Code', 'Plaats', 'Omschrijving', 'Netto', 'Bruto');
$aligns = array('center', 'center', 'center', 'center', 'center', 'center');
$valigns = array('middle', 'middle', 'middle', 'middle', 'middle', 'middle');
$doc->addTableRow($header, $aligns, $valigns, array('font-weight' => 'bold'));
$j=1;
while($j<$_GET['nr_cel'])
{
$plaats=str_replace("'","\'",$_SESSION[c][$j]);
$omschrijving=str_replace("'","\'",$_SESSION[d][$j]);
$header = array(''.$_SESSION[a][$j].'', ''.$_SESSION[b][$j].'', ''.$plaats.'', ''.$omschrijving.'', ''.$_SESSION[e][$j].'', ''.$_SESSION[f][$j].''.$_SESSION[g][$j].'');
$aligns = array('center', 'center', 'center', 'center', 'right', 'right');
$valigns = array('middle', 'middle', 'middle', 'middle', 'middle', 'middle');
$doc->addTableRow($header, $aligns, $valigns, NULL);
++$j;
}
$header = array('', '', '', 'Totaal', ''.$_GET[ss1].'', ''.$_GET[s2].'');
$aligns = array('center', 'center', 'center', 'center', 'right', 'right');
$valigns = array('middle', 'middle', 'middle', 'middle', 'middle', 'middle');
$doc->addTableRow($header, $aligns, $valigns, NULL);
$doc->endTable();
$doc->addParagraph(' &nbsp; ');
$doc->addImage('http://www.website.nl/db_newswork/logo/websiteVoet.PNG', 600, 90);
$doc->output();
?>



Can you help me with that?