Question: I have 2 input boxes for first name and last name of passengers travelling.  

There could be maximum 9 number of passengers.  

It is not allowed to have two passengers with same name(first and last combined)
How can I check if none of the passenger have same names(first and last name combined)

```
<input type="text" name="adultFirstName1" id="adultFirstName1" class="form-control input-sm" placeholder="" style="width:100%; padding:5px;">

```

Thanks.

**Edit:** 

I am not using a database to store the passenger names and the passengers are all entered on the same page.

Answer: 
You can add a verification javascript function , but first u need to have specific names for all input boxes . 
U can try something like this : 

```
<input type="text" name="adultFirstName1" id="adultFirstName1" class="form-control input-sm" placeholder="" style="width:100%; padding:5px;" OnClick="Verify();">
.
.
.
<input type="text" name="adultFirstName10" id="adultFirstName10" class="form-control input-sm" placeholder="" style="width:100%; padding:5px;" OnClick="Verify(id);">

```

then you'll need to verify at every change of value of a boxe .
Are there 2 input boxes for each passenger? If so, try something like this: 

```
$(document).ready(function(){
    $("button").click(function(){
        if($("#adultFirstName1").val() == $("#adultFirstName2").val() 
            && $("#adultLastName1").val() == $("#adultLastName2").val()) {

            //Names are the same

        }
    });
});

```

Or are you needing to check against the names of other passengers already in a database somewhere?