|
General Details
|
|
PHP (Hypertext Preprocess...
|
|
Posted 147 Days Ago
|
|
368 Views
|
|
Received 1 Rating
|
|
A general PHP escape functions on input strings
Description
As I make a lot of websites, I needed a simple, easy-to-use PHP function that will essentially make any inputs from the user "validated". So, I created this very simple function. Depending on the server's configuration, this function will either add slashes behind quotes to escape them and convert any HTML characters into their entity form or just convert the HTML characters into their entity form (some server configurations already escapes quotes). It is suggested that you use this function on all inputs where the user can enter a string. After this function has been called, the string is able to be inserted into a database.
Technical
Only PHP is required.
Source Code
Comments
| Please login to post comments. |
More "PHP (Hypertext Preprocessor)" Source Codes By This Author
Recently Posted "PHP (Hypertext Preprocessor)" Source Codes
Recently Rated "PHP (Hypertext Preprocessor)" Source Codes
|