About application/x-www-form-urlencoded
As a data format of form, application/x-www-form-urlencoded has its own characteristics
<form action= "handle.php" method= "post" >
<input type= "text" name= " uname" class= " uname" /><br />
<input type= "text" name= "email" class= " email " /><br />
<textarea rows= "5" cols= "5" name= "txt" ></textarea><br />
<input type= "submit" name= "submit" value= " submit " />
</form>
If the enctype value is not specified, the default value is application/x-www-form-urlencoded. Of course, this data format cannot support file uploads. If we need to upload files at the same time, we can manually specify enctype="multipart/form-data".
Figure 2
From Figure 2, we can verify its replacement rule
When using the GET method for request, the form data is encoded as application/x-www-form-urlencoded and appended to the request address, separated by '?'.
Let's briefly talk about the third value of enctype, text/plain. This encoding method is similar to application/x-www-form-urlencoded, but text/plain only replaces line breaks and spaces, and does not encode special characters. The Chinese characters in the above example will not be encoded.
Furthermore, if the request is made in POST mode, the name and value in the message body will not be reorganized into the form of name=value&name=value.
The above is a brief introduction to the application/x-www-form-urlencoded encoding of the form. You are welcome to leave a message below for discussion and common progress.
For reprinting, please send an email to 1244347461@qq.com for approval. After obtaining the author's consent, kindly include the source as a link.
Related Articles
Check if a Post exists in PHP
Publish Date:2025/04/13 Views:170 Category:PHP
-
PHP $_POST is a super global variable that can contain key-value pairs of HTML form data submitted through the post method. We will learn different ways to check $_POST if a and contains some data in this article. These methods will use iss
Terminate the PostgreSQL connection
Publish Date:2025/04/11 Views:199 Category:PostgreSQL
-
In this article, we will learn how to terminate a PostgreSQL session. Any open connections are run by background processes or tasks, PSQL which may no longer exist despite exiting the user interface or command line tool. Use ps -ef or grep
Single query to rename and change column type in PostgreSQL
Publish Date:2025/04/11 Views:166 Category:PostgreSQL
-
This article describes how to rename a column and change its type in PostgreSQL using only a single query. Renaming and changing column types in MySQL In MySQL , if you want to change the column type and rename it, you can use a simple stat
Joining columns using Select in PostgreSQL
Publish Date:2025/04/11 Views:176 Category:PostgreSQL
-
MySQL PostgreSQL is an object-relational database system, which means it can support more complex data types than its competitors . Today we will learn how to use SELECT the operator to join the columns of a table. Using operators to || joi
Using CASE in PostgreSQL
Publish Date:2025/04/11 Views:124 Category:PostgreSQL
-
This article shows how to use the statement in PostgreSQL CASE . CASE How to use the statement in PostgreSQL case Statements are similar to those in general-purpose programming languages if-else . But in SQL, if you want to write IF-ELSE ,
Using NOT IN with subqueries in PostgreSQL
Publish Date:2025/04/11 Views:93 Category:PostgreSQL
-
NOT IN The inverts the result of NOT simply using IN the operator. NOT IN The right side of the operator must have a subquery in which multiple columns are returned to check whether the expression matches the data. NOT IN Tends to return tr
Using variables in PostgreSQL
Publish Date:2025/04/11 Views:171 Category:PostgreSQL
-
This article will demonstrate how we can declare and assign values to variables in PostgreSQL. In PostgreSQL, DECLARE variables are declared using Often you will need variables in your PL/SQL scripts. In DECLARE the section called , y
Connect to PostgreSQL using a password
Publish Date:2025/04/11 Views:171 Category:PostgreSQL
-
This article shows various ways to connect to PostgreSQL using a password. It can be through the command line, pgpass a file, PGPASSWORD an environment variable or a connection string. Connecting to PostgreSQL with a password using the comm
Deleting a database in PostgreSQL via PSQL
Publish Date:2025/04/11 Views:166 Category:PostgreSQL
-
There are two ways to access PostgreSQL objects and databases on your system. One is through an interface, such as a graphical interface like PGADMIN, and the other is the basic command line tool psql. Today, we will look at DROP DATABASE t