alvarito Posted November 9, 2008 Share Posted November 9, 2008 Hi, I have a search form with select lists. I get the data from here (in an array) and send it to a php processing which will issue tabulated results. echo "<td>" . "<a href='". "Templates/detailsession.dwt.php?ida=" . urlencode($daten['ida']). "&sid= " . session_id() . "'>linktext</a>". "</td>"; echo "<td>" .htmlspecialchars($daten['activity']). "</td>"; echo "<td>" .htmlspecialchars($daten['region']). "</td>"; echo "<td>" .htmlspecialchars($daten['provider']). "</a>" . "</td>"; Then I get the results list page, (that tabulated data) coming out of the code above, which just loops through the arrays. Then from that tabulated data I can click on its links to get more detailed info of each row (like a drill down menu) I do that by running a SELECT query that takes the Id from the row. So far so good. Ok, so the detail page is displayed. On that page I also have links to allow the user to return to the Results list page (the tabulated data). Yes, but here is the problem: because I am not coming directly from the Search Form, as I did before, but from another page. There are no parameters to pass it and therefore, no dynamic data is recreated and the table is empty. So: I created and started sessions on each page AND on the processing script I saved the $_POST variables into $_SESSION arrays but still I am not getting the page recreated. I would have thought that my link from the detail page is not correct, but I do pass the PHPSESSID as I echo it and can see it. I thought that If am passing the PHPSESSID AND the S_SESSION arrays hold the values, they would regenerate the page. But that page was created by "activating " the S_POST variables initially. If I come from the detail page (and not from the search page) they dont get activated. Should I then figure out a way that that page gets activated when coming from the detail one? thanks a lot if anybody can give me a hint. I have been 16 hours on it nonstop Quote Link to comment https://forums.phpfreaks.com/topic/132040-recreating-dynamic-page-sessions/ Share on other sites More sharing options...
JonnoTheDev Posted November 10, 2008 Share Posted November 10, 2008 I would have just used a Javascript button to go back to your search results from the detail screen. <a href="#" onClick="history.go(-1)">Back to results</a> or <input type=button value="Back to results" onClick="history.go(-1)"> Quote Link to comment https://forums.phpfreaks.com/topic/132040-recreating-dynamic-page-sessions/#findComment-686677 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.