PHP String Sanitization Function

function sanitize_str($str) {
    return trim(htmlspecialchars($str));
}

Leave a Comment

Your email address will not be published. Required fields are marked *