Created
November 7, 2013 14:53
-
-
Save mikedugan/7355877 to your computer and use it in GitHub Desktop.
string cleaner upper
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| function clean($value) { | |
| // If magic quotes not turned on add slashes. | |
| if(!get_magic_quotes_gpc()) | |
| // Adds the slashes. | |
| { $value = addslashes($value); } | |
| // Strip any tags from the value. | |
| $value = strip_tags($value); | |
| // Return the value out of the function. | |
| return $value; | |
| } | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment