Design concept of php message board

Source: Internet
Author: User

-Design a program process
1. Functional requirements
2. Page design
3. Database design
4. Code design
5. Debug and release
-Form
1. form> </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 <input type = text>
Multi-line text box <textarea> </textarea>
B. password box <input type = password>
C. Multi-choice box <input type = checkbox checked> (the checked attribute indicates the selected status)
D. Single checked <input type = radio checked> (same as checked)
E. Drop-down menu
<Select>
<Option selected> </option> // selected specifies that the initial status of this option is selected.
</Select>
F. submit button <input type = submit>
Reset Button <input type = reset>
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.