June 5, 200818 yr hi again now that i have a working contact form i would like to make it secure,i have spent alnight getting confused by watching tutorials and seeing some scary hacking ways just by viewing the source ,i have been reading something about adding slashes? as any one got any ideas as i dont want my clients reciving spam thanks again
June 6, 200818 yr Is your form emailed or does it go into a database? Are you having trouble with bots filling out the form? If it's going into a database you can use: $var = mysql_real_escape_string($var); You could also use: $var = trim(stripslashes(strip_tags($var))); If you're emailing the form, there's a tutorial here: http://www.w3schools.com/PHP/php_secure_mail.asp If spam bots are the problem, you could use CAPTCHA. Although I would always reccommend you use the first one.
June 6, 200818 yr If you're emailing the form, there's a tutorial here: http://www.w3schools.com/PHP/php_secure_mail.asp The code they use in the tutorial only works on PHP 5 or greater.
June 6, 200818 yr Author thanks for the replies will check them out,i am having no problems but there is some easy methods of hacking the type of form i have on my site
Create an account or sign in to comment