Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Thursday, March 28, 2024
About Us
Magazine
Open Source
CVS
Services
Index  »  Projects  »  phpMyEdit  »  Forum  »  persist after [cancel]

phpMyEdit General     persist after [cancel]
Post new topic   Reply to topic    
 
Atara.H     Joined: 23 Jul 2014   Posts: 11  
Post Posted: 2016-01-28 13:37
Back to top  Reply with quote     

I use the following code for persist.
when I try to [change] a raw, the persist keeps the parameter in the URL.
but if I [cancel] the change, I return to the original page without my parameter in the URL.

How can I fix it?

my code:

if(isset($_GET['s'])) {
$sParam = $_GET['s'];
// . . . calculate $myFilter . . .
// e.g. $myFilter = "('12', '13')"
}


if($sParam != '') {

$opts['filters'] = "PMEtable0.familly in " . $myFilter;

// keep the param, e.g for sort by column:
$opts['cgi']['persist'] = array('s' => $sParam);
}

 
doug     Joined: 10 Feb 2003   Posts: 1013   Location: Denver, Colorado (USA)
Post Posted: 2016-01-28 16:32
Back to top  Reply with quote     

Try replacing $_GET with $_REQUEST (so that both GET and POST methods are evaluated).

 
Atara.H     Joined: 23 Jul 2014   Posts: 11  
Post Posted: 2016-01-31 12:09
Back to top  Reply with quote     

Thanks, using $_REQUEST solved it.

 
Post new topic   Reply to topic    

Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top · Feedback form · Application form
Report bug on PLATON.SK website · Terms of use · Privacy policy