ultrus Posted June 19, 2009 Share Posted June 19, 2009 Hello, I've created several contact forms. However I want to make BETTER ones. What steps should I take to prevent SQL, and other php related attacks? Any examples available? I appreciate the feedback. Link to comment https://forums.phpfreaks.com/topic/162920-secure-contact-form/ Share on other sites More sharing options...
RussellReal Posted June 19, 2009 Share Posted June 19, 2009 if its a contact form you should never hafta worry about SQL injection or anything else, just send the email to yourself with the contact form's data/information, and let your email service provider handle the security, BUT if you are still concerned.. Just remember, mysql_real_escape_string before you insert any STRINGs into a mysql query.. any values you EXPECT to be a number, you can be SURE its a number by simply data typing it example: $numValue = (int) $_POST['someNumberValue']; Link to comment https://forums.phpfreaks.com/topic/162920-secure-contact-form/#findComment-859625 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.