This article does not talk about the code. it only describes the design concept of the php message board and the technical processing used in the middle. if you need it, please refer to it. -Design a program flow 1. functions...
This article does not talk about the code. it only describes the design concept of the php message board and the technical processing used in the middle. if you need it, please refer to it.
-Design a program process
1. Functional requirements
2. page design
3. database design
4. code design
5. debug and release
-Form
1. form>
2. method: method for transferring form data to the server
Post (indicates embedding form data in an Http request)
Get (indicating attaching form data to the URL requesting this page) default method
Differences:
A. Get transmission has a small amount of data, which is mainly restricted by the URL length. Post can transmit a large amount of data.
B. Get is less secure, but the execution efficiency is better than Post.
Receiving parameters:
POST method: $ _ POST ['name']
GET method: $ _ GET ['name']
Note: $ _ POST and $ _ GET must be in uppercase;
If php5.0 or a later version is not enclosed in quotation marks, a notice-level error will be reported. Therefore, you must develop good writing habits and standardize them. Disable display_error.
Charging
$ _ POST: it is an array composed of variables passed by the http post method.
$ _ GET: it is an array composed of variables passed by the http get method.
$ _ COOKIE: it is an array composed of variables passed by HTTP Cookies.
$ _ SESSION: it is an array containing SESSION variables in the current script
Suggestions
1. GET is less secure than POST. it is recommended to use POST if it contains confidential information.
2. use GET for paging
3. common controls
A. single row text box
Multi-line text box
B. password box
C. multi-choice box(The checked attribute indicates the selected status)
D. single region(Checked is the same as above)
E. drop-down menu
// Selected specifies that the initial status of this option is selected
F. submit button
Reset button
4. date/time functions
Php: date, time;
Mysql: now
-Javascript verification
Onsubmit: When the submit button is clicked, if the content is "return function_name ();" the function returns FALSE, the form is not submitted.
-First known COOKIE
Setcookie (name, value, time );
Note: php cookies must be refreshed once to take effect.
Tutorial link:
Reprint at will ~ However, please keep the tutorial address★