I'm not big at taking options away from a customer / client / visitor to my site, but in a case like this, I would. You don't have to worry about all the different ways people can enter things, if you set the standards. For example, with the email....

Check it with JavaScript before the form is even submitted, and make sure it's in the format of '[EMAIL PROTECTED]'. If it isn't, don't let the form submit, and pop an alert to the visitor reminding them of the format that their email address must be in. You'll probably also want to check it on the server side, just in case the person has JS turned off. The phone number you can break up into 4 input boxes; area code, prefix, number, extension. Make the first three required, and you can check with JS that the AC and prefix contain exactally 3 digits, the number contains exactally 4, and the extension (if present) is only digits. Again, you'll probably want to check this on the server side just to make sure.

Basically, make them enter the data the way you want it. Just my $0.02.

Mike Miller wrote:
Ok I am building a site similar in purpose to elance for a client, and part
of their terms and conditions is no contact info till a bid has been
awarded. So they want all contact info that is posted to be removed on
submission of the bid, and any on site contact between buyer, and provider.

I have been beating my head against the wall trying to think of how to do
this but cannot think of a way, I know  the regex() function will probably
be the best way, but how to make it verifiy the info before posting to the
database , is just beyond my creativity:) besides that there are a million
ways to say things, like email for instance, [EMAIL PROTECTED]
somoeone at somplace Dot com
 and so on and on for email, phone, web address, instant messenger type

So I am truning to all of you that have been doing this a whole lot longer
than i have for suggestions.

Any help would be greatly appreciated,


It's all about the Rush

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to