Index
» Projekty
» phpMyEdit
» Fórum
» CGI persit question |
|
KarelB
Založený: 01.06.2007
Príspevky: 24
Zaslal: 2009-01-30 14:42
Návrat hore
Odpovedať s citátom
|
All,
I enter my php page with the table name in the $_GET variable.
So I set:
Kód: |
$opts['tb'] = $_GET['tb'];
|
and the table displays fine.
However I cannot do anything (sorting, viewing etc).
I searched the forums and found that I need to set:
Kód: |
$opts['cgi']['persist'] = array (tb =>$_GET['tb']);
|
This will solve sorting and going into view mode.
However the page navigation does not work (> or >>) and on the view mode I cannot cancel the view and go back to the main table.
I get the error message that the table name is not set.
ANybody know how to do this.
KArel
|
doug
Založený: 10.02.2003
Príspevky: 1013
Bydlisko: Denver, Colorado (USA)
Zaslal: 2009-01-31 16:09
Návrat hore
Odpovedať s citátom
|
I can't think of any reason why you'd want to set the table name by any method other than hard coding it, but the following may work.
Kód: |
$tb = array_key_exists('tb', @$_REQUEST) ? strip_tags(stripslashes(trim(@$_REQUEST['tb']))) : '';
$opts['cgi']['persist'] = array('tb' => $tb); |
|
KarelB
Založený: 01.06.2007
Príspevky: 24
Zaslal: 2009-02-01 09:57
Návrat hore
Odpovedať s citátom
|
Doug,
Thanks, that suggestion worked for me.
The reason I need this is that I created an admin page for my system.
One of the tasks is selecting a database table from a jumpmenu. Next is dumping the db table on the screen with phpMyEdit in view mode only.
This creates an ideal tool for other admins to only view the data. (For various reasons I do not want to give them access to phpMyAdmin)
Karel
|
Odoslať novú tému
Odpovedať na tému
|
|
|
|