Web Development with PHP and MySQLDynamic, database-driven small business web sites done right.
|
|
Web Developer ::
phpMyEdit ::
MySQL Cheat Sheet
:: |
|
|
phpMyEdit Configuration Options
So much information on phpMyEdit was compiled that the php-form-generator.com web site was created in 2006. Below are some older examples of filters for phpMyEdit forms. Variables used in most filters can be passed from another form, or from a link included in the page footer. <a href="my_form.php?ltr=A">A</a> In the requested form, process the variable and make it persistent across various page modes (Next, Previous, Search, Cancel). $ltr = @$_REQUEST['ltr']; In the following example, a sessions script passes $valid_user. Also, a column named valid_user exists in the database table. Only those records accessible to $valid_user and fictitious user 'public' will be displayed using the following filter. $opts['filters'] = 'valid_user = "'.$valid_user.'" OR valid_user = "public"'; The following example configures a persistent table level filter for one record id passed to the requested form using <a href="my_form.php?ltr=A&operation=View&id=1">ID #1</a>. This record remains filtered even if user clicks Cancel to leave View mode. array_key_exists('id',$_GET) ? $id = $_GET['id'] : $id = $rec; The following is a template for configuring different filters based on the numeric value associated with a variable named $xfl which is passed to the requested form through a link from another page, or from a link in the page footer. $xfl = @$_REQUEST['xfl']; The database connection is closed by phpMyEdit.class.php. Thus, in order to run separate database queries in the page footer you need to reopen a connection or comment out $this->disconnect(); in the class file. With PHP in general, declaring configuration variables using an array format like $opts['db'] for the database name has advantages over using a format like $db and $hn. For example, when variables are required by a function, you merely need to call global $opts; instead of global $db, $un, $pw, $hn;. phpMyEdit requires the first column in the database table contain unique data, thus it is wise to always define MySQL™ column 0 as a numeric autoincrement column. phpMyEdit PHP Form Generator Demo at php-form-generator.com Additional information is available at the phpMyEdit Forum.
|
|
copyright © 2010 - hockinson.com - all rights reserved
- php programmer in denver, colorado
- web developer in denver, colorado
- lightbox cms content management system - colorado web designer - colorado web developer - denver web developer - website hosting - php mysql form - mysql form maker |