Get the App
SLTechnology News&Howtos  ›  Development  › 

The solution of garbled Chinese characters submitted by from form in php

Shulou Source: shulou.com Published: 2022-06-03 12:26:37 11月15日 Update

This article will explain in detail the solution to the garbled Chinese characters submitted by the from form in php. The editor thinks it is very practical, so I share it with you for reference. I hope you can get something after reading this article.

Php from form to submit Chinese characters garbled solutions: 1, add "charset=UTF-8" to the head in html; 2, change all files to utf8 coding; 3, add "charset=UTF-8" in php.

This article operating environment: Windows7 system, PHP7.1 version, Dell G3 computer

What about the garbled Chinese characters submitted by the php from form?

The problem of garbled code when the php page form is submitted to php

The solution to the problem of garbled code in html- > php form submission is as follows:

1. Add at head in html

two。 Make sure all files are utf8 encoded

3. Add header ("Content-Type:text/html; charset=UTF-8") to php

Solve it.

On the "php from form submission of Chinese characters garbled solution" this article is shared here, I hope the above content can be of some help to you, so that you can learn more knowledge, if you think the article is good, please share it out for more people to see.

Tags: Garbled forms Chinese characters articles methods files more coding problems good practical content methods what to do articles schemes environment computers knowledge systems Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MySQL Docker NVidia Apple Xiaomi