Checking the input against static lists would be VERY cumbersome and prone to errors, so I came up with this idea:
Find an online phonebook of the country the user will mainly be from - and try to access it directly by using GET variables.
Example:
Code: Select all
// Check firstname:
http://www.myphonebook.com/search?name=&firstname=John
// Check lastname:
http://www.myphonebook.com/search?name=Smith&firstname=
EXTRA - Whipped cream with cherry on top:
Since a lot of those online phonebooks support wildcard search (e.g: "Jo*"), you would get results for incomplete names, too. I thought about parsing the search result with a regexp, storing matching strings in an array (e.g. using php's global regexp search).
It might be necessary to eliminate duplicate entries manually.
The array contents can then be offered to the user as a "Please select your proper name:" list.
e.g.: Joe, John, Johnny, Josef, ...
The only drawback is that names NOT listed on the first search result page will not be listed.