/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
################################################################ # # Data Cleaning Function # - helps prevent MySQL injection, use when building the query after database connecton established # - Original Source: http://www.digital-web.com/articles/bulletproof_contact_form_with_php/ # - trim function added by me # ################################################################ function cleanData($string) { { // strip slashes if mahic quotes are on } // remove unwanted HTML (not allowed) // trim any leading and trailing whitespace // return the string with escaping slashes }
URL: php