I am not a 'PHP guru' and I dont know where you can find an algorithm but:-

If the only problem is users adding/not using name extensions, then for your
company exists already test you could remove known extensions from the input
company name - ltd, plc, etc - and replace this with a wildcard for the

 eg. SELECT id FROM table WHERE name LIKE '$input_name_without_extensions%'


----- Original Message -----
From: "DonPro" <[EMAIL PROTECTED]>
To: "php list" <[EMAIL PROTECTED]>
Sent: Wednesday, October 02, 2002 4:27 PM
Subject: [PHP] How can I check for variances in spelling within form text
input fields?

> Hi,
> I would like some ideas on how to perform the following.  Any input from
> PHP gurus would be appreciated.
> I have a form where my customer feels out certain information.  Part of
> information is the company name, address, city and state/province of their
> customer.  I have to assign a unique number to their customer based on the
> information they typed in.
> Here is my problem:
> 1) They may enter the same customer twice but have a slightly different
> spelling (maybe adding a LTD. to the company name)
> 2) Two of my customers may have the same customer. They will type it into
> form but again with variant spelling.
> I would like to know if there is an algorithm which allows me to check for
> small variances in spelling so that I would know if this customer has
> already been assigned my unique number and therefore not assign a
> number.
> Thanks,
> Don
> --
> PHP General Mailing List (
> To unsubscribe, visit:

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to