During the project creation process, it was found that form submission was unsuccessful. later, it was found that the name of the control that I originally gave was invalid. after the control was submitted to the backend, it was found that all my control names contained. the name will be converted into an underscore after it is submitted _ a strange problem was found when I was working on a company project recently, submitting a normal form, I found that I could not normally get the submitted value. this discovery made me confused at the beginning. at first, I thought it was a problem with my service, I was unable to write data to the database normally. later I detected the SQL statement and found that the problem occurred when I got the data. the obtained data was empty. later I found that, all the variables originally submitted to the backend are not the expected variables, and are converted by PHP.
The test code is as follows:
The code is as follows:
Test form submission
If ($ _ POST ){
Echo'
';
Var_export ($ _ POST );
}
?>
Code Example 1
The result is as follows:
As you can see, all. are converted into _ underscores by the backend. in order to test other symbols, the above test has been conducted. so far, only the dot (.) has been found (.) will be converted to underscores (_), so I take info for granted at the backend. name cannot be accessed because it has been converted into info_name.