首页
开发手册
应用中心
工具
用户中心
FoundPHP Create a form
English
中文简体
English
上一篇
下一篇
###FoundPHP Create a form FoundPHP only needs 2 files to create a form, but in simple terms, the most common functions of a project are the list, add, edit, delete, and view functions. When building a brand new module, we use the most stable switch method, and the entrance is differentiated by to do. | function | case matter| | ------------ | ------------ | | list | default or empty| | add to | add | | edit | edit | | delete | del | | view | view | Data submission faces more complex problems. First, there can be three types of data submission。 $_GET、$_POST、$_FILES | function | Corresponding to FoundPHP | Description| | ------------ | ------------ | | $_GET | $address parameter name | browser address parameter | | $_POST | $P | Form submission parameters | | $_FILES | the same | upload file data | **Ways of identifying:** The FoundPHP data verification method uses an array verification method to reduce learning costs. The array provides dimensional parameters. Data verification can be achieved by adjusting the parameter method. The remaining time is to concentrate on the program logic. The above basic functions are explained. --- We build a test model, add form, verifying, and receiving and storing. Creating a test and default.php under the plugin/model directory. Module file: plugin/model/test/default.php ```php ``` Create a test and default.htm under the plugin/view/default directory. plugin/view/default/test/default.htm ```html
The main title of the article
For example: the latest XXX is released today">
content
{run:echo edit(array('id'=>'content','data'=>$content,'height'=>'200'));}
save
``` Browser access: http://localhost/foundphp/?a=test ![](data/files/edit/21/02/21/210221_16346373.jpg) Submit result: ``` Array ( [o] => 1 [titles] => Test information released by FoundPHP [content] => The FoundPHP framework revolutionizes the way of developing programs [content-html-code] => The FoundPHP framework revolutionizes the way of developing programs. ) ```