I am trying to make my registration script accept only letters and æøå, but nothing I've tried so far has worked. It still won't accept æøå.
This is my code so far
if ($_POST['first'] != "" && preg_match("%^[-a-zA-Z æøå\/]+$%", $_POST['first']) == true && strlen($_POST['first']) > 0) {
$input_first = mysqli_real_escape_string($con,$_POST['first']); }
else { header("Location: ../register.php?n=2"); exit; die(); }
What am I doing wrong?