If you have the names in a MySQL database try this:
SELECT REPLACE( name, ' ', '' )
This will give you all the names with the spaces removed.
Take the name supplied by the user and
$short_name = str_replace( $name, ' ', '' );
This will give you the name in a short version.
Then do a case insensitive compare:
$trueORfalse = eregi( $dbname, $short_name );
This will give true if you find a match.
Hope this works,
Matt B