iEntry 10th Anniversary Forum Rules Search
WebProWorld
Register FAQ Calendar Mark Forums Read
Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome.

Share Thread: & Tags

Share Thread:

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-16-2006, 05:16 AM
mantawebsolutions's Avatar
WebProWorld Veteran
 
Join Date: Jun 2004
Location: Pretoria, South Africa
Posts: 307
mantawebsolutions RepRank 0
Default Proper PHP form validation to stop SPAM

Can someone direct me to where i can find an easy way to stop automated submissions from occuring via my website's enquiry form.

if you want to take a look at my form go to w*w.mantawebsolutions.com/contactus.php

The validation uses JS as can be seen here: w*w.mantawebsolutions.com/enquiry-validate.js

any help will be fantastic, thanks
Reply With Quote
  #2 (permalink)  
Old 08-16-2006, 07:11 AM
WebProWorld Pro
 
Join Date: Aug 2003
Location: UK
Posts: 112
irodgers RepRank 0
Default Strip out anything that can be interpreted by php

Strip out anything that can be interpreted by php. I only realised this myself a few days ago. Spammers were using my enquiry form and were putting php scripts into the actual text box. So use -

stripslashes()
strip_tags()
escapeshellcmd()
htmlspecialchars()

Those are php commands by the way.

I think that should do it.
__________________
Markgreat
Homes by Speyside
Tickets!
Reply With Quote
  #3 (permalink)  
Old 08-16-2006, 08:42 AM
mantawebsolutions's Avatar
WebProWorld Veteran
 
Join Date: Jun 2004
Location: Pretoria, South Africa
Posts: 307
mantawebsolutions RepRank 0
Default

thanks irodgers. i am using stripslashes() in my form action but not the others, will find out how to correctly apply them
Reply With Quote
  #4 (permalink)  
Old 08-16-2006, 10:52 AM
stymiee's Avatar
WebProWorld Veteran
 
Join Date: May 2006
Location: New Jersey
Posts: 429
stymiee RepRank 0
Default

You need to use CAPTCHA
__________________
John Conde
Brainyminds Merchant Account Services eBook Giant
Reply With Quote
  #5 (permalink)  
Old 08-16-2006, 12:02 PM
WebProWorld Pro
 
Join Date: Aug 2003
Location: UK
Posts: 112
irodgers RepRank 0
Default W3C

Quote:
Originally Posted by stymiee
You need to use CAPTCHA
w3 has a bit of a dislike of CAPTCHA - see -

http://www.w3.org/TR/turingtest/
__________________
Markgreat
Homes by Speyside
Tickets!
Reply With Quote
  #6 (permalink)  
Old 08-16-2006, 01:05 PM
Webnauts's Avatar
WebProWorld 1,000+ Club
WebProWorld MVP
 
Join Date: Aug 2003
Location: Worldwide
Posts: 8,167
Webnauts RepRank 9Webnauts RepRank 9Webnauts RepRank 9Webnauts RepRank 9Webnauts RepRank 9Webnauts RepRank 9Webnauts RepRank 9Webnauts RepRank 9Webnauts RepRank 9Webnauts RepRank 9
Default Thread moved

Thread moved here...
__________________
"Being an expert isn't telling other people what you know. It's understanding what questions to ask, and flexibly applying your knowledge to the specific situation at hand. Being an expert means providing sensible, highly contextual direction." Jeff Atwood
SEO Workers - Search Engine Optimization Consulting Company | SEO Analysis Tool | Webnauts Net SEO
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 07:27 PM.



Search Engine Optimization by vBSEO 3.3.0