Hi Bob, Many thanks for taking the time to help on this - it's really appreciated.
I'm very, very new to this, could you please let me know how the complete page would look please, including your part as well? Here's the current code: http://www.011005.com/230106.phps Any help is very much appreciated. Chris. > -----Original Message----- > From: [email protected] > [mailto:[EMAIL PROTECTED] On Behalf Of Bob > Sent: Monday, January 30, 2006 4:57 AM > To: [email protected] > Subject: Re: [php-list] Need help on a php form > > Hi Chris, > This is what I use for email inputs. > > if ($type == 'email') { > $raw = trim($raw); > $raw = substr($raw, 0, 200); > $raw = strtolower($raw); > $raw = preg_replace('/[EMAIL PROTECTED]/', '*', $raw); > return; > } > > It's part of a larger routine I use for different form inputs. > All inputs stripped of tags regardless and checked from POST > beforehand. > Any invalid characters get a * > Then checked for see if it's validly formed. > > function validate_email($email) { > if (strlen($email) <10) {return false;} > $format = > "/^[-_a-z0-9]+(\.[-_a-z0-9]+)[EMAIL PROTECTED](\.[-a-z0 -9]+)*\.[a-z > ]{2,6}$/i"; > return (preg_match($format, $email)); > } > > I hope this will stop multiple emails sent. > I record all mail sent anyway, so I know how much it's being > used (or abused). > Someone let me know, if this can be misused or improved. > Bob. > > > ----- Original Message ----- > From: "Chris" <[EMAIL PROTECTED]> > To: <[email protected]> > Sent: Sunday, January 29, 2006 9:07 AM > Subject: RE: [php-list] Need help on a php form > > > Thank you for that, here goes. I'm trying to > > ensure that > > the form is not abused by spammers, but not quite > > sure > > how to do it. > Community email addresses: Post message: [email protected] Subscribe: [EMAIL PROTECTED] Unsubscribe: [EMAIL PROTECTED] List owner: [EMAIL PROTECTED] Shortcut URL to this page: http://groups.yahoo.com/group/php-list Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/php-list/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
