You are here: Disappearing $_SESSION « PHP Programming Language « IT news, forums, messages
Disappearing $_SESSION

Posted by DartmanX on 10/11/05 23:46

I have created a wizard which walks a user through a process of
selecting 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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация