Re: [PHP] Poll of sorts: Javascript Form validation or PHP

2008-12-08 Thread Per Jessen
tedd wrote: At 5:10 PM +0100 12/7/08, Per Jessen wrote: You cannot have 8bit characters to the left of the @ in the email address. I'm not sure that's correct. I am sure. In fact, the entire email header must not contain any 8-bit characters. I.e. it _can_, but it is a violation of

Re: [PHP] Poll of sorts: Javascript Form validation or PHP

2008-12-08 Thread Per Jessen
tedd wrote: The php routine also passed [EMAIL PROTECTED], which is real -- but it's interesting that most email (if not all) programs cannot show the domain name correctly, which is [EMAIL PROTECTED] I have yet to find an email program that can show IDNS correctly. Tedd, I've got a distinct

Re: [PHP] Poll of sorts: Javascript Form validation or PHP

2008-12-07 Thread Ashley Sheridan
On Sun, 2008-12-07 at 17:36 +1030, Michael Kubler wrote: I agree with Nathan. Always do server side validation, and if you have the skills, time, or are being paid then add javascript validation to make the user experience better. I have a general contact form which checks the input server

Re: [PHP] Poll of sorts: Javascript Form validation or PHP

2008-12-07 Thread Yeti
I put a small one together using regular expressions, http://www.ashleysheridan.co.uk/coding_php_validation.php So we are regexing emails again? #OUT OF coding_php_validation.php COPY case 'email': { $expression = /^([a-z0-9_\-\.]+)@([a-z0-9_\-\.]+)\.([a-z]{2,5})$/i; $errorText

Re: [PHP] Poll of sorts: Javascript Form validation or PHP

2008-12-07 Thread Ashley Sheridan
On Sun, 2008-12-07 at 02:27 -0800, Yeti wrote: I put a small one together using regular expressions, http://www.ashleysheridan.co.uk/coding_php_validation.php So we are regexing emails again? #OUT OF coding_php_validation.php COPY case 'email': { $expression =

Re: [PHP] Poll of sorts: Javascript Form validation or PHP

2008-12-07 Thread Nathan Rixham
Ashley Sheridan wrote: On Sun, 2008-12-07 at 02:27 -0800, Yeti wrote: I put a small one together using regular expressions, http://www.ashleysheridan.co.uk/coding_php_validation.php So we are regexing emails again? #OUT OF coding_php_validation.php COPY case 'email': { $expression =

Re: [PHP] Poll of sorts: Javascript Form validation or PHP

2008-12-07 Thread Luke Slater
/** Validate an email address. Provide email address (raw input) Returns true if the email address has the email address format and the domain exists. Not following the usual coding style I know but I can't bring myself to touch it... You'd better not

Re: [PHP] Poll of sorts: Javascript Form validation or PHP

2008-12-07 Thread Per Jessen
Nathan Rixham wrote: Valid email addresses according to the Multipurpose Internet Mail Extension (MIME) [2]: [EMAIL PROTECTED] Ã(c)@℞.com Uh, no, those aren't valid email address according to any standard. You cannot have 8bit characters to the left of the @ in the email address. The same

Re: [PHP] Poll of sorts: Javascript Form validation or PHP

2008-12-07 Thread Per Jessen
Per Jessen wrote: address. The same really goes for the same on the right hand side of the @, but some people have difficulties distinguishing between the _actual_ email address and it may be rendered when the domain part is converted from punycode. That should have read and THE WAY it may

Re: [PHP] Poll of sorts: Javascript Form validation or PHP

2008-12-07 Thread tedd
At 1:59 PM + 12/7/08, Luke Slater wrote: /** Validate an email address. Provide email address (raw input) Returns true if the email address has the email address format and the domain exists. Not following the usual coding style I know but I can't

Re: [PHP] Poll of sorts: Javascript Form validation or PHP

2008-12-07 Thread Luke Slater
Well to reproduce most of that would perhaps be fairly easy, most of it is regex stuff. There may be trouble with the checkdnsrr() stuff though, which is for checking that the domain exists. I wouldn't imagine there would be anything like that for JS... Perhaps there is... You could always

Re: [PHP] Poll of sorts: Javascript Form validation or PHP

2008-12-07 Thread tedd
At 5:10 PM +0100 12/7/08, Per Jessen wrote: You cannot have 8bit characters to the left of the @ in the email address. I'm not sure that's correct. I distinctly remember Paul Hoffman, the director of the Internet Mail Consortium (http://www.imc.org/) saying that the left side of the @ has

Re: [PHP] Poll of sorts: Javascript Form validation or PHP

2008-12-07 Thread Robert Cummings
On Sun, 2008-12-07 at 13:59 +, Luke Slater wrote: /** Validate an email address. Provide email address (raw input) Returns true if the email address has the email address format and the domain exists. Not following the usual coding style I know but I

Re: [PHP] Poll of sorts: Javascript Form validation or PHP

2008-12-07 Thread Luke Slater
Ooh I didn't mean you actually, was taken out of a collab project I'm working on with a.. Not so considerate... Co-worker on there called Rob. Forgot to remove the comment =) Ah yes didn't notice that, sorry for the labourous extra TABs and backspaces I've put you through ;) On Sun, 7 Dec

Re: [PHP] Poll of sorts: Javascript Form validation or PHP

2008-12-07 Thread Nathan Rixham
On Sun, 2008-12-07 at 13:59 +, Luke Slater wrote: /** Validate an email address. Provide email address (raw input) Returns true if the email address has the email address format and the domain exists. Not following the usual coding style I know but I can't bring

Re: [PHP] Poll of sorts: Javascript Form validation or PHP

2008-12-07 Thread Robert Cummings
On Sun, 2008-12-07 at 18:01 +, Nathan Rixham wrote: On Sun, 2008-12-07 at 13:59 +, Luke Slater wrote: /** Validate an email address. Provide email address (raw input) Returns true if the email address has the email address format and the domain exists.

Re: [PHP] Poll of sorts: Javascript Form validation or PHP

2008-12-07 Thread Luke Slater
Well the guy who wrote that piece of code passed away fairly recently =( I bet he's sitting somewhere right now cursing you for pointing out that indentation error though, haha On Sun, 7 Dec 2008, Robert Cummings wrote: On Sun, 2008-12-07 at 18:01 +, Nathan Rixham wrote: On Sun,

Re: [PHP] Poll of sorts: Javascript Form validation or PHP

2008-12-07 Thread Yeti
I think hotmail, or was it some other mail mogul, is allowing their users to have those weird German umlauts and some accented characters. EXAMPLE: [EMAIL PROTECTED] We are living in a multilingual world with dozens of alphabets. Especiall those doing government sites should consider

Re: [PHP] Poll of sorts: Javascript Form validation or PHP

2008-12-07 Thread Per Jessen
Yeti wrote: I think hotmail, or was it some other mail mogul, is allowing their users to have those weird German umlauts and some accented characters. EXAMPLE: [EMAIL PROTECTED] Anyone who allows 8-bit characters on the left side of the @ is in for trouble. It won't work. /Per

Re: [PHP] Poll of sorts: Javascript Form validation or PHP

2008-12-07 Thread Ashley Sheridan
On Sun, 2008-12-07 at 20:31 +0100, Per Jessen wrote: Yeti wrote: I think hotmail, or was it some other mail mogul, is allowing their users to have those weird German umlauts and some accented characters. EXAMPLE: [EMAIL PROTECTED] Anyone who allows 8-bit characters on the left

Re: [PHP] Poll of sorts: Javascript Form validation or PHP

2008-12-07 Thread Nathan Rixham
Ashley Sheridan wrote: On Sun, 2008-12-07 at 20:31 +0100, Per Jessen wrote: Yeti wrote: I think hotmail, or was it some other mail mogul, is allowing their users to have those weird German umlauts and some accented characters. EXAMPLE: [EMAIL PROTECTED] Anyone who allows 8-bit characters

Re: [PHP] Poll of sorts: Javascript Form validation or PHP

2008-12-07 Thread Robert Cummings
On Sun, 2008-12-07 at 19:54 +, Nathan Rixham wrote: Ashley Sheridan wrote: On Sun, 2008-12-07 at 20:31 +0100, Per Jessen wrote: Yeti wrote: I think hotmail, or was it some other mail mogul, is allowing their users to have those weird German umlauts and some accented characters.

Re: [PHP] Poll of sorts: Javascript Form validation or PHP

2008-12-07 Thread Ashley Sheridan
On Sun, 2008-12-07 at 15:13 -0500, Robert Cummings wrote: On Sun, 2008-12-07 at 19:54 +, Nathan Rixham wrote: Ashley Sheridan wrote: On Sun, 2008-12-07 at 20:31 +0100, Per Jessen wrote: Yeti wrote: I think hotmail, or was it some other mail mogul, is allowing their users to

Re: [PHP] Poll of sorts: Javascript Form validation or PHP

2008-12-07 Thread Nathan Rixham
Ashley Sheridan wrote: On Sun, 2008-12-07 at 15:13 -0500, Robert Cummings wrote: On Sun, 2008-12-07 at 19:54 +, Nathan Rixham wrote: Ashley Sheridan wrote: On Sun, 2008-12-07 at 20:31 +0100, Per Jessen wrote: Yeti wrote: I think hotmail, or was it

Re: [PHP] Poll of sorts: Javascript Form validation or PHP

2008-12-07 Thread Ashley Sheridan
On Sun, 2008-12-07 at 20:21 +, Nathan Rixham wrote: pessary I had to Google that one, and wished I didn't... Ash www.ashleysheridan.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Poll of sorts: Javascript Form validation or PHP

2008-12-06 Thread Per Jessen
Terion Miller wrote: I have a huge form to validate and wonder which is better javascript validation or php, the page is a php page, I actually put js validation on it but then it stopped working (stopped inserting into the db) not sure if that had anything to do with it What does

Re: [PHP] Poll of sorts: Javascript Form validation or PHP

2008-12-06 Thread Nathan Rixham
Per Jessen wrote: Terion Miller wrote: I have a huge form to validate and wonder which is better javascript validation or php, the page is a php page, I actually put js validation on it but then it stopped working (stopped inserting into the db) not sure if that had anything to do with it

Re: [PHP] Poll of sorts: Javascript Form validation or PHP

2008-12-06 Thread Michael Kubler
I agree with Nathan. Always do server side validation, and if you have the skills, time, or are being paid then add javascript validation to make the user experience better. I have a general contact form which checks the input server side (PHP) and if there's something wrong then it indicates

[PHP] Poll of sorts: Javascript Form validation or PHP

2008-12-05 Thread Terion Miller
I have a huge form to validate and wonder which is better javascript validation or php, the page is a php page, I actually put js validation on it but then it stopped working (stopped inserting into the db) not sure if that had anything to do with it What does everyone prefer? Terion who is

Re: [PHP] Poll of sorts: Javascript Form validation or PHP

2008-12-05 Thread Stut
On 5 Dec 2008, at 18:28, Terion Miller wrote: I have a huge form to validate and wonder which is better javascript validation or php, the page is a php page, I actually put js validation on it but then it stopped working (stopped inserting into the db) not sure if that had anything to do

Re: [PHP] Poll of sorts: Javascript Form validation or PHP

2008-12-05 Thread Andrew Ballard
On Fri, Dec 5, 2008 at 1:28 PM, Terion Miller [EMAIL PROTECTED] wrote: I have a huge form to validate and wonder which is better javascript validation or php, the page is a php page, I actually put js validation on it but then it stopped working (stopped inserting into the db) not sure if that

Re: [PHP] Poll of sorts: Javascript Form validation or PHP

2008-12-05 Thread Wolf
Terion Miller [EMAIL PROTECTED] wrote: I have a huge form to validate and wonder which is better javascript validation or php, the page is a php page, I actually put js validation on it but then it stopped working (stopped inserting into the db) not sure if that had anything to do with

Re: [PHP] Poll of sorts: Javascript Form validation or PHP

2008-12-05 Thread Yeti
Java Script should always be an option, unless you write the validation for yourself or people you personally know only. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Poll of sorts: Javascript Form validation or PHP

2008-12-05 Thread Ashley Sheridan
On Fri, 2008-12-05 at 12:08 -0800, Yeti wrote: Java Script should always be an option, unless you write the validation for yourself or people you personally know only. JavaScript is client-side, ergo untrusted. Javascript can be nice as an addition, but only that. Ash

Re: [PHP] Poll of sorts: Javascript Form validation or PHP

2008-12-05 Thread Bastien Koert
On Fri, Dec 5, 2008 at 3:18 PM, Ashley Sheridan [EMAIL PROTECTED]wrote: On Fri, 2008-12-05 at 12:08 -0800, Yeti wrote: Java Script should always be an option, unless you write the validation for yourself or people you personally know only. JavaScript is client-side, ergo untrusted.

Re: [PHP] Poll of sorts: Javascript Form validation or PHP

2008-12-05 Thread Ashley Sheridan
On Fri, 2008-12-05 at 15:16 -0500, Bastien Koert wrote: On Fri, Dec 5, 2008 at 3:18 PM, Ashley Sheridan [EMAIL PROTECTED]wrote: On Fri, 2008-12-05 at 12:08 -0800, Yeti wrote: Java Script should always be an option, unless you write the validation for yourself or people you personally

Re: [PHP] Poll of sorts: Javascript Form validation or PHP

2008-12-05 Thread Yeti
Nuclear power plants got the MCA [1] Developers got the MCA [2] [1] maximum credible accident [2] maximum credible addlebrained Both of them are what nobody likes to think of, but they can (and do?) happen. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Poll of sorts: Javascript Form validation or PHP

2008-12-05 Thread Clancy
On Fri, 05 Dec 2008 20:24:07 +, [EMAIL PROTECTED] (Ashley Sheridan) wrote: On Fri, 2008-12-05 at 15:16 -0500, Bastien Koert wrote: On Fri, Dec 5, 2008 at 3:18 PM, Ashley Sheridan [EMAIL PROTECTED]wrote: On Fri, 2008-12-05 at 12:08 -0800, Yeti wrote: Java Script should always be an

Re: [PHP] Poll of sorts: Javascript Form validation or PHP

2008-12-05 Thread Ashley Sheridan
On Sat, 2008-12-06 at 08:38 +1100, Clancy wrote: On Fri, 05 Dec 2008 20:24:07 +, [EMAIL PROTECTED] (Ashley Sheridan) wrote: On Fri, 2008-12-05 at 15:16 -0500, Bastien Koert wrote: On Fri, Dec 5, 2008 at 3:18 PM, Ashley Sheridan [EMAIL PROTECTED]wrote: On Fri, 2008-12-05 at 12:08