Hi Patrick, Many thanks for the help - would you be able to show a complete page with that on at all please? I'm not exactly sure where it all goes ;-( Chris. > -----Original Message----- > From: php-objects@xxxxxxxxxxxxxxx > [mailto:php-objects@xxxxxxxxxxxxxxx] On Behalf Of Patrick Bands > Sent: Tuesday, January 31, 2006 11:21 AM > To: php-objects@xxxxxxxxxxxxxxx > Subject: RE: How do you make a form unusable by > spammers please? > > Hi, > > You could use a function to clean the user input > > function cleanUserInput($in, $len) > { > $in = substr(trim($in), 0, $len); > $in = > preg_replace("/[\r\n]+[\s\t]*[\r\n]+/", "", > $in); > $in = escapeshellcmd($in); > return $in; > } > > For $_POST used I use the function in this way > > foreach ($_POST as $varname => $value) { > $formVars[$varname] = > cleanUserInput($value, 60); > } > Hope this helps > > -----Original Message----- > From: php-objects@xxxxxxxxxxxxxxx > [mailto:php-objects@xxxxxxxxxxxxxxx] On > Behalf Of Chris > Sent: 30 January 2006 02:46 > To: php-objects@xxxxxxxxxxxxxxx > Subject: How do you make a form unusable by > spammers please? > > > Hi all, I'm desperately trying to get a php form > to not be > used by spammers, I don't want anything to do with > javascript or captcha's. Can anyone please let me > know > what changes I would need to make to the code on > the > link below? If I can view the *complete* resultant > code > somehow, that would be great, otherwise I'm not > sure > where the code goes ;-) > > Here's the page: > http://www.011005.com/230106 > > Here's the code: > http://www.011005.com/230106.phps > > Any help is very much appreciated. > > Chris. > > > > PHP Data object relational mapping generator > http://www.metastorage.net/ > PHP Data object relational mapping generator http://www.metastorage.net/ Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/php-objects/ <*> To unsubscribe from this group, send an email to: php-objects-unsubscribe@xxxxxxxxxxxxxxx <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/