I have a client with a ‘hyphen’ their email address. (company-dept @ company.com). They tried testing a form using their own email address. And it fails, the PHP Feedback form will not process the form.
Is this a bug? or just me.
Could someone else try putting an email in their own PHP form (with a ‘hyphen’). See if this happens to your form.
It could be an over-restrictive regular expression testing for the
quality of the e-mail address. I don’t have a copy of the Action
here, but I imagine this would be easy to fix if it’s not encoded.
Otherwise, if you e-mail Tim Plumb, I am sure he can sort this out
for you.
Walter
On Mar 3, 2008, at 9:11 AM, WebWorker wrote:
I have a client with a ‘hyphen’ their email address. (company-dept
@ company.com). They tried testing a form using their own email
address. And it fails, the PHP Feedback form will not process the
form.
Is this a bug? or just me.
Could someone else try putting an email in their own PHP form (with
a ‘hyphen’). See if this happens to your form.
Try opening the Action on your computer. You can add this change to
the regular expression there and be set for life! Actions live in
[your home folder]/Library/Application Support/Freeway 4/Actions/
General/ and they can be opened with any plain-text editor.
Oh, and you should put the hyphen as the first character in the
regex, that way you don’t have to worry about it being interpreted as
part of a range. If last works for you, that’s great, but first is
the “proper” place for it according to the thick book of Regex-fu.
Walter
On Mar 3, 2008, at 9:45 AM, WebWorker wrote:
Adding the ‘-’ to the PHP file (on the server) fixed the problem
(temporary fix)
if (!preg_match('/^[a-zA-Z0-9_.]+@[a-zA-Z0-9-.]+.[a-zA-
Z]+(.[a-zA-Z]+)?$/’, $email)){
to
if (!preg_match('/^[a-zA-Z0-9_.-]+@[a-zA-Z0-9-.]+.[a-zA-
Yes opened the PHP (text) action and changed it there also. Thanks for the tip about ‘-’ first.
If you try and complete the contact form at: FreewayActions.com | Contact and enter an email address (firstname-lastnamename @ domain.com) with hypen the form fails. I assume thats using the latest version - which is encrypted.
I think others should know in case they are missing replies to forms (if only a small percentage)
Note that putting the extra ‘-’ immediately before the ‘]’ that
closes the group is not accidental.
A ‘-’ at either end means ‘-’ as you want. A ‘-’ in the middle can
indicate a range from the character before it to the one after, which
can really mess things up.
David
–
David Ledger - Freelance Unix Sysadmin in the UK.
HP-UX specialist of hpUG technical user group (www.hpug.org.uk)
email@hidden www.ivdcs.co.uk
Aha, never assume that my web site uses the latest version of my actions!
I’m sure I added support for hyphens a while ago but checking just now it
appears this only went in the domain ‘bit’. I’ll update the action and bump the
version to reflect the change.
Thanks WebWorker.
Regards,
Tim.
Yes opened the PHP (text) action and changed it there also. Thanks for the
tip about ‘-’ first.
If you try and complete the contact form at: FreewayActions.com | Contact and enter an email address
(firstname-lastnamename @ domain.com) with hypen the form fails. I assume
thats using the latest version - which is encrypted.
I think others should know in case they are missing replies to forms (if only
a small percentage)