Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Pondelok, 30. november 2026
O nás
Magazín
Otvorený softvér
CVS
Služby
Index  »  Projekty  »  phpMyEdit  »  Fórum  »  Problem with redirect page

phpMyEdit Configuration     Problem with redirect page
Odoslať novú tému   Odpovedať na tému    
 
jisse     Založený: 14.02.2008   Príspevky: 4  
Príspevok Zaslal: 2008-02-14 12:24
Návrat hore  Odpovedať s citátom     

Hello,

First, I'm newbie with php and phpMyEdit so sorry if my question is... a newbie question :-)

I used phpMyEdit with success. I integrated it in my apply and I can view and add datas without problem.

But, when I want to use sort or copy... buttons, I obtain a blank page.

My appli is, in 1st, an index.php with a menu. Each element of this menu give at the index.php the page to included

For ex :
menu :
Kód:
<a href="index.php?page=toto"</a>

index:
Kód:
if (!isset($_GET["page"])) { $page = 'accueil'; }else{ $page = $_GET["page"]; }
switch ($page) {
case 'toto': include ('pages/toto.php');break;
....


So, when I use phpMyEdit button, the page name is correct but is completed by other term :

ex :
Kód:
index.php?page=toto?fl=0&fm=0&sfn[0]=1&operation=Modifier&rec=1


and the page is not display.

Somebody could tell me how can I solve this problem ? May be the phpMyEdit params could be transfert in an another way ?

Thanks a lot

 
michal     Založený: 17.06.2003   Príspevky: 537   Bydlisko: Slovakia
Príspevok Zaslal: 2008-02-14 14:33
Návrat hore  Odpovedať s citátom     

search for $opts['cgi']['persist'] in docs

 
jisse     Založený: 14.02.2008   Príspevky: 4  
Príspevok Zaslal: 2008-02-14 15:05
Návrat hore  Odpovedať s citátom     

michal Napísal:
search for $opts['cgi']['persist'] in docs


Thanks Michal,

I've already tried to use (and understand) persists variable but in vain (understand in vain too :-( )I'm very newbie with phpMyEdit and php).

So, logically, when I clic on sort (for example), my url is composed by url and many terms, like this :
Kód:
http://localhost/action_dd5/index.php?page=toto?fm=0&fl=0&qfn=&sfn[0]=-0&sfn[1]=3&sfn[2]=2&sfn[3]=0


In my index php, when I try to capture the "page" term with GET["page"], this give me toto?fm=0 may be because I have 2 '?' (one before "page" and one before "fm"). So, I've made a little function to explode string et obtain correct "page" value. It works but it's dirty. Can I pass fm, fl... and other variables in another way ?

Many thanks


Naposledy upravil jisse dňa 2008-02-14 15:26, celkom upravené 1 krát

 
michal     Založený: 17.06.2003   Príspevky: 537   Bydlisko: Slovakia
Príspevok Zaslal: 2008-02-14 15:10
Návrat hore  Odpovedať s citátom     

in the switch, sometime $_GET is used, sometimes $_POST...

those two ? in url are strange, normally just one should occure.
try $opts['page_name'] = 'index.php'; in toto.php.

 
jisse     Založený: 14.02.2008   Príspevky: 4  
Príspevok Zaslal: 2008-02-14 15:23
Návrat hore  Odpovedať s citátom     

Actually, I have :
Kód:
$opts['page_name'] = 'index.php?page=toto';

(I've tested many combinaisons before call for help)

So, I've tested like you've told to me :
Kód:
$opts['page_name'] = 'index.php';


It's no work, the url is formed like this
Kód:
http://localhost/action_dd5/index.php?fm=0&fl=0&qfn=&sfn[0]=2&sfn[1]=1


On the other hand, the 'index.php?page=toto' value in page_name is really well used with the Add button (if I erase this value, I can't obtain the Add form)

Thanks (PS : sorry for my bad english...)

 
michal     Založený: 17.06.2003   Príspevky: 537   Bydlisko: Slovakia
Príspevok Zaslal: 2008-02-14 15:37
Návrat hore  Odpovedať s citátom     

try:
$opts['page_name'] = 'index.php';
$opts['cgi']['persist']['page'] = 'toto';

and in the switch
$page = $_GET['page'];
if(strlen($page)<1) $page = $_POST['page'];
if(strlen($page)<1) $page = 'accueil';
switch ($page) ...

 
jisse     Založený: 14.02.2008   Príspevky: 4  
Príspevok Zaslal: 2008-02-14 15:57
Návrat hore  Odpovedať s citátom     

It works perfectly :-)

Many thanks to you Michal !!!!

 
cbek     Založený: 25.10.2008   Príspevky: 27  
Príspevok Zaslal: 2008-10-25 10:24
Návrat hore  Odpovedať s citátom     

It works also perfectly for me :-)

Many thanks to you Michal !!!!

 
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