I have a clientvendor.php file with various filters in it. This file directs to updateclientvendor.php file.
Now updateclientvendor.php has a Back button to go back to clientvendor.php . When the back button is pressed, I want the page to go back and display the filtered information which is not displayed when i use header( 'Location: clientvendor.php' ).
How can i store the contents of the filtered page when pressing back button !
I am filtering clientvendor.php based on 2 parameters : SelectType and SelectStatus. And then the user has to press Filter button to get the effect !
Please help me with this problem !
how to go back to a php page keeping the search criteria?
Moderator: General Moderators
Re: how to go back to a php page keeping the search criteria?
You have a number of choices,
In updateClientVendor.php save the filters and modify the link of the back button to send the filters back to the previous page (on the URL as GET params, i.e. clientvendor.php?filter1=&filter2=) when they go back.
Save the filters to the session when they hit updateclientvendor.php, and write clientvendor.php to load the filters from the session when it is loaded.
Save the filters to cookies before going to updateclientvendor.php and restore them from the cookies when they go back (blech, not fun, not recommended, no reason to do it this way, but you can!)
In updateClientVendor.php save the filters and modify the link of the back button to send the filters back to the previous page (on the URL as GET params, i.e. clientvendor.php?filter1=&filter2=) when they go back.
Save the filters to the session when they hit updateclientvendor.php, and write clientvendor.php to load the filters from the session when it is loaded.
Save the filters to cookies before going to updateclientvendor.php and restore them from the cookies when they go back (blech, not fun, not recommended, no reason to do it this way, but you can!)
Re: how to go back to a php page keeping the search criteria?
Thanks for your reply !
Could you elaborate a little bit on how to use this one - "In updateClientVendor.php save the filters and modify the link of the back button to send the filters back to the previous page (on the URL as GET params, i.e. clientvendor.php?filter1=&filter2=) when they go back."
How would the sample URL be?
Could you elaborate a little bit on how to use this one - "In updateClientVendor.php save the filters and modify the link of the back button to send the filters back to the previous page (on the URL as GET params, i.e. clientvendor.php?filter1=&filter2=) when they go back."
How would the sample URL be?
Re: how to go back to a php page keeping the search criteria?
What was your question again???aditi_19 wrote:Thanks for your reply !
Could you elaborate a little bit on how to use this one - "In updateClientVendor.php save the filters and modify the link of the back button to send the filters back to the previous page (on the URL as GET params, i.e. clientvendor.php?filter1=&filter2=) when they go back."
How would the sample URL be?
Re: how to go back to a php page keeping the search criteria?
I mean how would be my URL in order to jump back to the filtered clientvendor.php page?
Say suppose i store it in this way:
UpdateClientVendor.php
$filtertype =$_POST['SelectType'];
$filterstatus =$_POST['SelectStatus'];
if(isset($_POST['Back']))
{
//URL ... So What should the URL be?
}
Say suppose i store it in this way:
UpdateClientVendor.php
$filtertype =$_POST['SelectType'];
$filterstatus =$_POST['SelectStatus'];
if(isset($_POST['Back']))
{
//URL ... So What should the URL be?
}