Пример #1
0
function raw_homemade_sanitize($input)
{
    $input = htmlspecialchars($input, ENT_IGNORE, 'utf-8');
    $input = strip_tags($input);
    $input = stripslashes($input);
    $input = raw_dirty_replace($input);
    $input = trim($input);
    return $input;
}
function details_as_json()
{
    $details = [];
    $basic_values = array("city", "user_city", "service_category_id", "service_category_name", "service_id", "service_name", "vin_number", "brand", "model", "year", "engine", "engine_letters", "name_and_surnames", "phone", "email", "wants_newsletter", "accepts_privacy", "comments");
    foreach ($posted_values as $key => $value) {
        if (!in_array($key, $basic_values)) {
            $details[$key] = raw_dirty_replace($value);
        }
    }
    return json_encode($details);
}