<?
// Note: this is a sample table (here table is 'test') creation and management file to help you get fammiliar with phpMyApplication
$tname="test"; //MySQL table name existing or to be created
$ttitle="Test table";
$z=0; //0 indicates first column. Note: first col must be primary key
$pma[$z]['field']="id"; // column name which you have created by MySQL
$pma[$z]['title']=" ID "; // title or caption { could be blank }
$pma[$z]['type']="xnum"; //*** type of your field { number: integer } ### MySQL type: INTEGER or VARCHAR
$pma[$z]['auto']=1; // Auto increment { No need to insert or modify when adding or editingexcept when you want to force it }
$pma[$z]['size']=10; // input box size
$pma[$z]['max']=6; // max length of input number
$pma[$z]['nolist']=1; // don't list this columnt
$pma[$z]['noedit']=1; // not editable
$pma[$z]['adminonly']=1; // Viewed by admin only
$z++; // ++ means next column! You can also use other variables or numbers. Move this paragraph to change place at generated form
$pma[$z]['field']="name";
$pma[$z]['title']=" Name ";
$pma[$z]['type']="xchar"; //*** type of your field { varchar: short strings upto 255 } ### MySQL type: VARCHAR
$pma[$z]['max']=200; // max length of input string
$pma[$z]['size']=50;
$pma[$z]['required']=1; // mandatory column { should'nt be empty. user should enter something when adding or editing }
$z++; //next column
$pma[$z]['field']="txt";
$pma[$z]['title']=" Introduction ";
$pma[$z]['type']="xtext"; //*** type of your field { textarea : text upto 64KB } ### MySQL type: TEXT
$pma[$z]['cols']="50"; // number of columns of displayed textarea
$pma[$z]['rows']="10"; // number of rows of displayed textarea
$pma[$z]['nolist']=1;
$z++; //next column
$pma[$z]['field']="chk";
$pma[$z]['title']=" PHP lover? ";
$pma[$z]['type']="xcheck"; //*** type of your field { checkbox } ### MySQL type: CHAR
$pma[$z]['ontitle']=" yes "; // display at list if checkbox is on instead of value
$pma[$z]['def']="1"; // default value, recommened to use 1 for normal usages
$z++; //next column
$pma[$z]['field']="radio";
$pma[$z]['title']=" Level ";
$pma[$z]['type']="xradio"; //*** type of your field { radio } ### MySQL type: CHAR
$pma[$z]['title1']=" Beginner "; // first option title
$pma[$z]['val1']=1; //first option value
$pma[$z]['title2']=" Advanced ";
$pma[$z]['val2']=2;
$pma[$z]['title3']=" Senior ";
$pma[$z]['val3']=3;
$pma[$z]['def']=2; // default value or checked one
// Note: you can add upto 10 options for xradio by defining as $fy[$z]['titlex']="" and $fy[$z]['valx']= .Here we made 3 options
$z++;
$pma[$z]['field']="pic";
$pma[$z]['title']=" Photo ";
$pma[$z]['type']="ximage"; //*** type of your field { image jpg,gif,png } ### MySQL type: VARCHAR
$pma[$z]['max']=150; //K bytes maximum size of the image file
$pma[$z]['w']=1024; // maximum allowed width in pixels
$pma[$z]['h']=768; //maximum allowed height
$pma[$z]['folder']="test_images"; // folder name which images should be copied in (if dosn't exist create it before running)
$z++;
$pma[$z]['field']="sel";
$pma[$z]['title']=" City ";
$pma[$z]['type']="xsel"; //*** type of your field or column { select } ### MySQL type: CHAR, TINYINT, SMALLINT, INTEGER OR VARCHAR
$pma[$z]['tbl']="city"; // name of the table which keeps selection options (values and option)
$pma[$z]['kodf']="id"; // name of the field which keeps code (value)
$pma[$z]['disf']="name"; // name of the field to be displayed (option)
//$pma[$z]['kod0']="0"; //first option value :: (optional)
//$pma[$z]['dis0']="Please select"; // first option displays :: (optional)
$z++;
$pma[$z]['field']="num";
$pma[$z]['title']=" Birth date ";
$pma[$z]['type']="xnum";// like field 0 { number }
$pma[$z]['max']=4;
$pma[$z]['size']=4;
$z++;
$pma[$z]['field']="file"; //field or column name
$pma[$z]['title']=" Document file "; //title
$pma[$z]['type']="xfile"; //*** type of your field { allowed file types such as .zip .doc .pdf ...} ### MySQL type: VARCHAR
$pma[$z]['max']=300; //K bytes max allowed file size
$pma[$z]['folder']="test_files";// folder name which files should be copied in (if dosn't exist create it before running)
$z++;
$pma[$z]['field']="time"; //field or column name { according to your table }
$pma[$z]['title']="Profile Last update"; //title
$pma[$z]['type']="xtime"; //*** type of your field or column { timestamp } ### MySQL type: INTEGER
$pma[$z]['format']="d M, Y - G:i"; // time/date format {php time displaying format}
$pma[$z]['update']=1; //update when row is edited { acts as last update time , otherwise(0) as creation time}
//--------------------------------------------------------
require_once "phpmyapp.php";
?>