Re: How can I check for variances in spelling within form text input fields?
| From: | Debbie Dyer | Date: | Wed, 02 Oct 2002 16:56:49 +0000 |
| Subject: | Re: How can I check for variances in spelling within form text input fields? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-118619@lists.php.net to get a copy of this message | ||
Don
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
check.
eg. SELECT id FROM table WHERE name LIKE '$input_name_without_extensions%'
Debbie
----- Original Message -----
From: "DonPro" <donpro@lclcan.com>
To: "php list" <php-general@lists.php.net>
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
the
> PHP gurus would be appreciated.
>
> I have a form where my customer feels out certain information. Part of
this
> 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
my
> 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
duplicate
> number.
>
> Thanks,
> Don
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>