Index
» Projekty
» phpMyEdit
» Fórum
» persist after [cancel] |
|
Atara.H
Založený: 23.07.2014
Príspevky: 11
Zaslal: 2016-01-28 13:37
Návrat hore
Odpovedať s citátom
|
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
Založený: 10.02.2003
Príspevky: 1013
Bydlisko: Denver, Colorado (USA)
Zaslal: 2016-01-28 16:32
Návrat hore
Odpovedať s citátom
|
Try replacing $_GET with $_REQUEST (so that both GET and POST methods are evaluated).
|
Atara.H
Založený: 23.07.2014
Príspevky: 11
Zaslal: 2016-01-31 12:09
Návrat hore
Odpovedať s citátom
|
Thanks, using $_REQUEST solved it.
|
Odoslať novú tému
Odpovedať na tému
|
|
|
|