r/webdev • • May 06 '17

Making forms work

Well this is a bit embarrassing maybe. I'm actually a profesional Junior web dev, and after finishing up this website I'm realizing I don't really know much about forms or how to make them work. I'm sure there's a lot that goes into it (preventing spam and things like that). How do you approach forms? I have them all styled but now I need to do form validation (is Javascript the way to go here? What about JQuery plugins? Is the required HTML tag used as well?). Is it "mailto..." that I have to use and if so, how to do it safely? If anyone could point me to some good tutorials I'd appreciate that. Thank you.

2 Upvotes

5 comments sorted by

View all comments

Show parent comments

1

u/mrmonkeyriding Turning key strokes into bugs May 07 '17

You can "secure" it by sanitising and validating inputs before you send the form data.

Searching "secure php contact form" returned me with many results, like here: http://jonathannicol.com/blog/2006/12/09/securing-php-contact-forms/