I have a php function to check for "Cities":
function validate_city($field) {
if ($field == "") return "Enter city.<br />";
else if (preg_match("/[^-a-zA-z-]/", $field))
return "City hame only from letters and -.<br />";
return "";
}
Each time I enter the name of the Cyrillic city (for example, "Minsk"), it returns: City hame only from letters and -. The variable $ _POST ['city'] looks like this:
In JS, this code works correctly, I think something is encoded .....
source
share