Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Štvrtok, 15. október 2026
O nás
Magazín
Otvorený softvér
CVS
Služby
Index  »  Projekty  »  phpMyEdit  »  Fórum  »  CGI persist suddenly not persisting?

phpMyEdit Configuration     CGI persist suddenly not persisting?
Odoslať novú tému   Odpovedať na tému    
 
jtzako     Založený: 12.01.2017   Príspevky: 16  
Príspevok Zaslal: 2017-01-18 21:15
Návrat hore  Odpovedať s citátom     

I have a CGI Persist in my page and it had been working but today it has stopped working and I cant figure out why.

I got the code here in another post because I wanted to filter by month based on a field in my DB.

I can still do the filter by clicking one of my filter buttons (or by putting ?month=01 in the URL).

However, if I Add or Change a record the ?month= disappears and I go back to default.


$month = array_key_exists('month', @$_REQUEST) ? strip_tags(stripslashes(trim(@$_REQUEST['month']))) : '';

if($month > '') {

$opts['cgi']['persist'] = array('month' => $month);
$opts['filters'] = 'CMDate REGEXP "^'.$month.'"';

// echo "\n".'<p><font color=black>'.htmlentities($opts['filters'], ENT_QUOTES, 'UTF-8').'</font></p>';

}

 
jtzako     Založený: 12.01.2017   Príspevky: 16  
Príspevok Zaslal: 2017-01-18 21:25
Návrat hore  Odpovedať s citátom     

Ok, here's something odd. Without changing anything it suddenly started working again.

It isnt keeping the month= in the URL though. I'm not sure why, I thought that would have stayed in place.

However, the filter seems to be working based on what the month= was most recently set to.

 
doug     Založený: 10.02.2003   Príspevky: 1013   Bydlisko: Denver, Colorado (USA)
Príspevok Zaslal: 2017-01-18 23:18
Návrat hore  Odpovedať s citátom     

Sometimes browsers can get messed up. Clear the cache and/or try a different browser.

The posted code indicates persistence only when the month is non-empty (has a value).

To verify which variables are set, try including dBug.php in your footer: http://dbug.ospinto.com/

-or-

// ksort($_REQUEST);

$print_r_text = preg_replace('/\n/s', "\r\n", print_r($_REQUEST, true));

echo !stristr($print_r_text, ']') ? '' : "\n".'<p>$_REQUEST</p><pre>'.htmlspecialchars($print_r_text).'</pre>';

 
Odoslať novú tému   Odpovedať na tému    

Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok · Odkazový formulár · Prihláška
Upozorniť na chybu na PLATON.SK webstránke · Podmienky použitia · Ochrana osobných údajov