Check if a field is capitalized?

$field = 'First Name';

if(ucwords($field) !== $field){
 // not capitalized

}else{
 // capitalized

}

see ucwords()

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)