Re: Formatting form information before submission

by "Darrell King" <darrell(at)webctr.com>

 Date:  Fri, 25 Oct 2002 12:29:11 -0400
 To:  <amcbainezzell(at)alum.mit.edu>,
"'HWG Techniques'" <hwg-techniques(at)hwg.org>
 References:  STARRYKNIGHT
  todo: View Thread, Original
Which doesn't allow for the rules Missy has to work with.  At least Mcdonald
would pass that test!

:)

----- Original Message -----
From: Ann Ezzell



Unfortunately, this approach doesn't handle names like McDonald...

This is why a lot of databases just store everything in uppercase.

> -----Original Message-----
> From: owner-hwg-techniques(at)hwg.org
>
>
> If you can identify each field seperately , you could handle
> case simply
> enough.  Fior instance, if the "name" variable is called $name:
>
> $name=ucwords($strtolower($name));
>
> The inner function lowercases all the letters in the
> variable, then the
> outer function, ucwords(), makes the first letter of each
> word uppercase.
>
http://www.php.net/manual/en/function.ucwords.php

D


----- Original Message -----
From: Missy Scott

Hi all,

The problem:  When people go to submit the forms, they don't always use
proper capitalization.  A lot of them are OK, but there are some that
look
like:
JoHn Q. PuBliC
123 AnYwHeRe St
AnYWhEre, USA

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA