I see a couple of errors, one of which is the source of your problem.
You write:
"SELECT name FROM thetable WHERE (nome=$leter%) ORDER BY nome ASC";
This would evaluate to
"SELECT name FROM thetable WHERE (nome=A%) ORDER BY nome ASC";
What you need to write is:
"SELECT name FROM thetable WHERE (nome like '$leter%') ORDER BY nome ASC";
"like" is required to make regular expression match.
The quotes are always required when dealing with strings (and a few other
types).
You could have just debugged this by
echo $query;
Also: Letter contains two t's. :)
Regards
/Jørn Cornelius Olsen