You can optionally append or overwrite individual variables returned from the CGI environment (GET/POST HTTP protocol data). Use these two arrays for this purpose, where array key means CGI variable name, and array value means CGI variable value.
This will activate the search filter on script initialization. However, it is still possible to turn it off by explicit click on Hide or Clear button.
The next example shows how to cause descending sorting according first field in all
cases. Because ['overwrite']
is used, sorting column cannot
be altered by the user by clicking on column heading.
Using the $opts['cgi']['persist']
option you can tell phpMyEdit names and
values of CGI variables which should be persistent during various pages
reloading and serving. They will be included into all links and also into all
forms as appropriate hidden inputs. This feature is provided especially for
advanced and experienced users using phpMyEdit in their medium-size and large-size
projects. If you do not understand what does this thing do, feel free to skip
it. You will surely do not need it.
Example 3-31. Persistent CGI variables
$opts['cgi']['persist'] = array( 'article_id' => $article_id, 'session_id' => $SESSION_ID );
The type of performed operation such as Add, Change, Delete and so on, is
passed using a CGI variable named operation
. When passed through a
link, for example when $opts['navigation']
is set
to 'G'
or 'T'
, the
value is an untranslated label prefixed with PME_op_
.
This prefix can be changed by setting the
$opts['cgi']['prefix']['operation']
variable in the calling
script.
If you already use in your project some CGI variables used internally by phpMyEdit,
like 'operation
, you may want to prefix phpMyEdit's variables to avoid
collision. For the same reason, you may want to prefix the names of input
fields.