3.11. CGI variables

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.

Example 3-24. CGI variables appending

$opts['cgi']['append']['fl'] = 1

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.

Example 3-25. CGI variables overwriting

$opts['cgi']['overwrite']['sfn'] = '-0';

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-26. Persistent CGI variables

$opts['cgi']['persist'] = array(
		'article_id' => $article_id,
		'session_id' => $SESSION_ID
		);