Re: form validation
- From: Jerry Stuckle <jstucklex@xxxxxxxxxxxxx>
- Date: Sat, 03 Mar 2007 09:01:44 -0500
Lurius wrote:
lepage.diane@xxxxxxxxx formulated on keskiviikko :Hello
I am a newbie to PHP. Please bear with me. I need to validate the
following fields using php.
1. email (needs to be just one e-mail address, and take out stuff like
bcc or anything that would be used for e-mail injection vulnerability)
2. Phone number (has to be in the format 555-5555)
3. Phone number area code (has to be limited to 3 characters)
4. Address has to be stripped of all illegal characters like slashes,
special characters etc
Another thing is I don't want people to be able to leave any of the
fields blank.
Where does the validation code go?
After this statement?
if($REQUEST_METHOD=="POST") or before?
I have tried a few things, but I am not sure what most people use, any
help would be appreciated.
Have a wonderful day
Diane
Hi, you should check these: http://www.php.net/manual/en/ref.filter.php,
http://phpro.org/tutorials/Filtering-Data-with-PHP.html and
http://devzone.zend.com/node/view/id/1113.
-Lurius
Don't bother. While the idea is good, this is one of the worst interfaces ever added to PhP.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@xxxxxxxxxxxxx
==================
.
- References:
- Re: form validation
- From: Lurius
- Re: form validation
- Prev by Date: Re: Multiple Statements in a query
- Next by Date: Re: mail function
- Previous by thread: Re: form validation
- Next by thread: Re: form validation
- Index(es):
Relevant Pages
|