|  | Posted by DartmanX on 10/11/05 23:46 
I have created a wizard which walks a user through a process ofselecting data to be generated into an XML file.
 
 Each page adds its own data to $_SESSION, until the final page. On this
 page, an input button launches a PHP script (genHTML.php) that creates
 an HTML file. The genHTML file starts by setting two headers:
 
 header('Content-type: text/html');
 header('Content-Disposition: attachment; filename="countymap.html"');
 
 The first time I create the HTML file (which is actually a Smarty
 template), the variable $_SESSION['key'] is added to the countymap.html
 template and the user is prompted to save the countymap.html file.
 
 However, if I click the button to generate the file more than once,
 $_SESSION['key'] is somehow unset.
 
 Each page of the wizard calls session_write_close() at the end of the
 script, which I thought would solve the problem, but did not.
 
 Can anyone assist me?
 
 Jason
  Navigation: [Reply to this message] |