Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Utorok, 24. november 2026
O nás
Magazín
Otvorený softvér
CVS
Služby
Index  »  Projekty  »  phpMyEdit  »  Fórum  »  variables and register global=off

phpMyEdit Configuration     variables and register global=off
Odoslať novú tému   Odpovedať na tému    
 
chuny30     Založený: 13.04.2003   Príspevky: 6  
Príspevok Zaslal: 2004-09-08 05:40
Návrat hore  Odpovedať s citátom     

I'm obviously new to php, so I could use some help. I want to use one phpMyEdit page to basically filter several diffferent request from a different page. For instance set up multiple if statements to handle different queries. Below is an example:

if ($request==Open) {
$opts['filters'] = "Status='$request'";
$opts['cgi']['persist'] = array('open' => $request);

}
if ($request==Fail) {
$opts['filters'] = "Status='Closed' and Results='$request' and TO_DAYS(NOW()) -TO_DAYS(End_date) <='$count'";
$opts['cgi']['persist'] = array('fail' => $request);

}
if ($request==Pass) {
$opts['filters'] = "Status='Closed' and Results='$request' and TO_DAYS(NOW()) -TO_DAYS(End_date) <='$count'";
$opts['cgi']['persist'] = array('pass' => $request);

The problem I'm having is setting up the variables. I send the variable through a url, but I cannot get the variable to stick. I can get the variable intially through $_GET, but once I go to Add and cancel I lose the variable. I have my php.ini register_global (php 4.3) set to off. Any ideas on setting this up smartly?

Thank You

 
michal     Založený: 17.06.2003   Príspevky: 537   Bydlisko: Slovakia
Príspevok Zaslal: 2004-09-08 15:46
Návrat hore  Odpovedať s citátom     

you can use get_cgi_vars method from phpMyEdit. just copy&paste. problem is that variable change from $_GET to $_POST and back any time....

 
chuny30     Založený: 13.04.2003   Príspevky: 6  
Príspevok Zaslal: 2004-09-09 04:01
Návrat hore  Odpovedať s citátom     

I'm not sure I understand the get_cgi_vars method. I can't find it anywhere in the documents pertaining to it. Could you please explain a little further?

 
michal     Založený: 17.06.2003   Príspevky: 537   Bydlisko: Slovakia
Príspevok Zaslal: 2004-09-09 16:44
Návrat hore  Odpovedať s citátom     

it's in the source code of phpMyEdit.

see

http://www.php.net/manual/en/security.globals.php

for a clearer explanation than I would be able to give :)

 
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