if(mysqli_query($conn, 'SELECT * FROM userst WHERE email='.$_POST['email'])==null){
$error = 'Пользователь с таким никнеймом уже существует';
}
SELECT * FROM userst WHERE email="email"
if(mysqli_num_rows(mysqli_query($conn, 'SELECT * FROM userst WHERE email='.$_POST['email']))==0)
if(mysqli_num_rows(mysqli_query($conn, 'SELECT * FROM userst WHERE email="'.$_POST['email'].'"'))==0)
'SELECT * FROM userst WHERE email="'.$_POST['email'].'"'