fazlionline Posted October 10, 2009 Report Posted October 10, 2009 More problems with Mail () I have a form with some fields on my client site. For the time being, I used my own email, if the user check the form and fill it, all the email data comes to my inbox. But I received some marketing emails in my inbox and used the email address of that site. my code is: <?php $to = "123@yahoo.com"; $url = "ACD - Contact Form"; $subject = $_REQUEST['subj'] ; $org = $_REQUEST['org'] ; $tele = $_REQUEST['tele'] ; $city = $_REQUEST['city'] ; $email = $_REQUEST['email'] ; $message = $_REQUEST['message'] ; $details = "URL - Form : $url\n Subject: $subject\n Organization: $org\n Telephone: $tele\n City: $city\n From: $email \n Message: $message \n "; $headers = "From: $email"; $sent = mail($to, $subject, $details, $headers, $message) ; if($sent) {print "Your mail was sent successfully"; } else {print "We encountered an error sending your mail"; } ?> How can I get rid of it? Quote
jlhaslip Posted October 10, 2009 Report Posted October 10, 2009 try adding a Captcha to the form and script. Google it. Quote
falkencreative Posted October 10, 2009 Report Posted October 10, 2009 Also consider doing a search for "securing a contact form" or similar... Here are a couple articles: http://f6design.com/journal/2006/12/09/securing-php-contact-forms/ http://www.phpnerds.com/article/building-a-secure-contact-form http://net.tutsplus.com/tutorials/php/build-your-own-captcha-and-contact-form/ Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.