[snip]
I have a question about sessions, I am attempting to store a search  
term in a session variable to that when it finds the set of records  
from the database it can export it to excel. The problem I have is  
that the session variable is 1 search behind...
[/snip]

When you do the search store the search term immediately to the session
variable;

<?php
//pseudo-code
start_session();
$_SESSION['searchTerm'] = $_GET['searchTerm'];
?>
<html>
<a href="link to excel sheet">
</html>

Now in the code that generates the excel;

<?php
session_start();
$getStuffForExcel = "SELECT foo, bar FROM data where foo =
'".$_SESSION['searchTerm']."' ";
?>

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to