Php simple method of handling form input special characters, form special characters
This article describes a simple way for PHP to handle special characters of form input. Share to everyone for your reference, as follows:
<?php if ($_post[' submitted '] = = "Yes") { $yourname = $_post[' yourname ']; $yourname = Trim ($yourname); $yourname = Strip_tags ($yourname); $yourname = Htmlspecialchars ($yourname); $yourname = Addslashes ($yourname); Echo $yourname. "
"; ? >try again<?php } if ($_post[' submitted ']! = "Yes") { ?> <?php }
More readers interested in PHP related content can view this site topic: "PHP String Usage Summary", "PHP Operations and Operator Usage Summary", "PHP Basic Syntax Primer tutorial" and "PHP Prevention SQL injection Method Summary"
I hope this article is helpful to you in PHP programming.
Articles you may be interested in:
- A summary of the filtering and processing methods for submitting special characters to the form by PHP
- LTrim and RTrim in PHP remove left and right spaces and special character instances
- PHP uses Trim function to remove left and right spaces and special character instances
- Old PHP escape functions for special characters in JSON
- function code for PHP to replace special characters in extra-long text
- PHP regular Expression Special characters [: Alnum:] [: alpha:] etc.
- PHP implementation code with slashes before special characters
- PHP Special character processing function
http://www.bkjia.com/PHPjc/1098688.html www.bkjia.com true http://www.bkjia.com/PHPjc/1098688.html techarticle php Simple method of processing form input special characters, form special characters This article describes a simple way for PHP to handle the special characters of form input. Share to everyone for reference, with ...