Hi, I am using: if ( !preg_match("/^[0-9 a-z A-Z.ñÑ]+$/",$_POST['country']) ) {die (header( 'Location: invalid?country' ));} I want add "ñÑ" for the contry Spain / España but this dont work. Why? Regards.
Maybe use... $country = str_replace('Spain', 'España', $_POST['country']); PHP: EDIT: thats all you need right ?
Thanks MyVodaFone. Yes, invalid?country is a valid location. I fix it with: if ( !eregi("^[a-zA-ZáéÃóúÃÉÃÓÚñÑ 0-9 ,._]",$_POST... PHP: Regards.