
didn't see this before the last one!
Yes that is easily doable, what you're asking. However i'm not a PHP'er but the general idea for the database would be to create it as if you were plotting the cities/towns on a graph- so each town/city would be distance x away from the origin. and grid out this graph so each city would go in a grid reference, just a numbered block really.
then if someone searched for a city in block B, you would select all cities/towns in block B and the ones which were less than 50 miles difference away from point o (the origin) you would spit out to the client.
That's just the general idea- it will need tweaking but i'm pretty sure that would work. Also if you're new to SQL you might to read
this
HTH's
Boog's