These are my codes, I want to validate and filter special characters entered by user, even they by pass it, the query wouldn't accept the entered data but it's not working it's always failing.
public function updateuserAction(){
$this->view->disable();
$get = $this->request;
$key = $get->get('key');
$email = $get->get('email');
$password = $get->get('password');
$realName = $get->get('realName');
$type = $get->get('userType');
if(filter_var($realname, FILTER_VALIDATE_REGEXP, array("options" => array("regexp" => "/^[a-zA-Z]+$/")))){
$url = $this->apiUrl."user/update?q=(key:$key,email:".urlencode($email).",password:".urlencode($password).",realName:".urlencode($realName).",userType:".urlencode($type).")&envelope=false";
$ch = curl_init($url);
curl_setopt_array($ch, $this->curlopt);
echo curl_exec($ch);
}else{
echo "failed";
}
}