Index
» Projects
» phpMyEdit
» Forum
» persist after [cancel] |
|
Atara.H
Joined: 23 Jul 2014
Posts: 11
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)
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
Posted: 2016-01-31 12:09
Back to top
Reply with quote
|
Thanks, using $_REQUEST solved it.
|
Post new topic
Reply to topic
|
|
|
|