I've got script that outputs results as a list of hyperlinks containing a variable which points to another script that opens in a new window when you click one of the links.
I'm trying to get both scripts to effectively run in the same window without losing the results of the first script and also have the results of the second script appear in a <div> somewhere on the page, so I go through the results on the first page and keep getting the second set of results refreshed on the same page.
The problem is when I come to click the hyperlink now I've put both scripts together I just go back to the original starting form for the first script as if all my variables have vanished.
Do I need to be using session variables for everything or something?
If so is there a straight forward way of turning all the variables in the $_POST superglobal to $_SESSION?
Two scripts in one?
Moderator: General Moderators
- scorphus
- Forum Regular
- Posts: 589
- Joined: Fri May 09, 2003 11:53 pm
- Location: Belo Horizonte, Brazil
- Contact:
Simply:
Follow this example: http://scorphus.no-ip.com/lab/session/
On page4.php the $_POST is copied to $_SESSION. You can view the sources by clicking the .phps files.
-- Scorphus
Code: Select all
<?php
//...
$_SESSION['_POST'] = $_POST;
//...
?>On page4.php the $_POST is copied to $_SESSION. You can view the sources by clicking the .phps files.
-- Scorphus