Go Back   CodingForums.com > :: Server side development > PHP > Post a PHP snippet

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 11-20-2005, 02:55 AM   PM User | #16
Scrowler
Regular Coder

 
Join Date: Jul 2003
Location: New Zealand
Posts: 435
Thanks: 1
Thanked 0 Times in 0 Posts
Scrowler is an unknown quantity at this point
would this work for something like email@address.co.nz?
Scrowler is offline   Reply With Quote
Old 11-20-2005, 10:03 AM   PM User | #17
vinyl-junkie
$object->toCD-R(LP);


 
vinyl-junkie's Avatar
 
Join Date: Jun 2003
Posts: 3,054
Thanks: 2
Thanked 22 Times in 22 Posts
vinyl-junkie is on a distinguished road
Quote:
Originally Posted by Scrowler
would this work for something like email@address.co.nz?
I have this validation code in place on my contact form. I just tried it with your hypothetical email address, and it passed the validation.
__________________
Music Around The World - Collecting tips, trade
and want lists, album reviews, & more
SNAP to it!
vinyl-junkie is offline   Reply With Quote
Old 11-20-2005, 07:19 PM   PM User | #18
felgall
Master Coder

 
felgall's Avatar
 
Join Date: Sep 2005
Location: Sydney, Australia
Posts: 5,530
Thanks: 0
Thanked 503 Times in 494 Posts
felgall is a jewel in the roughfelgall is a jewel in the roughfelgall is a jewel in the rough
What about

me@downtown.museum

remember that museum is a valid top level domain.

How about

me@[124.56.137.21]

Using the ip address in place of the domain name is also valid.
__________________
Stephen
Learn Modern JavaScript - http://javascriptexample.net/
Helping others to solve their computer problem at http://www.felgall.com/
felgall is offline   Reply With Quote
Old 11-20-2005, 07:24 PM   PM User | #19
vinyl-junkie
$object->toCD-R(LP);


 
vinyl-junkie's Avatar
 
Join Date: Jun 2003
Posts: 3,054
Thanks: 2
Thanked 22 Times in 22 Posts
vinyl-junkie is on a distinguished road
Neither one of those email addresses passes validation using the regular expression we've been discussing in this thread. I just tried it with the contact form on my website, which has that code in it.
__________________
Music Around The World - Collecting tips, trade
and want lists, album reviews, & more
SNAP to it!
vinyl-junkie is offline   Reply With Quote
Old 11-21-2005, 07:39 PM   PM User | #20
ghell
Senior Coder

 
Join Date: Apr 2003
Location: England
Posts: 1,192
Thanks: 5
Thanked 13 Times in 13 Posts
ghell is on a distinguished road
i dont write php but couldnt half of these regular expressions be cut down using \w (or \W, i forget which) instead of a-zA-Z0-9_
__________________
My tech/code blog
ghell is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 06:25 PM.


Advertisement
Log in to turn off these ads.