Home  >  Article  >  Backend Development  >  PHP form submission (POST&GET&URL encoding/decoding)

PHP form submission (POST&GET&URL encoding/decoding)

WBOY
WBOYOriginal
2016-08-08 09:27:501164browse

The POST method does not rely on the URL and does not display the passed parameter values ​​in the address bar. In addition, the POST method can transfer data to the server without restrictions. All submitted information is transmitted in the background. Users cannot see this process in the browser. High security. The

POST method is more suitable for sending confidential or large amounts of data to the server.

The GET method is the default method of the method attribute in the

form. Form data submitted using the GET method is appended to the URL and sent to the server as part of the URL.

Note: To send a form using the GET method, the length of the URL should be limited to 1MB characters. If the amount of data sent is too large, the data will be truncated, causing unexpected or failed processing results.

Encode/decode the data passed by the hyperlink:

string urlencode(string str): URL-encode the string str

string urldecode(string str): Decode

The above introduces PHP form submission (POST&GET&URL encoding/decoding), including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn