Recommendations for Processing Email Addresses Entered

Hello everyone,

I was wanting to know what you all thought the best technique is to process email addresses entered in my form. Should I do it in JavaScript, or should I have my web server do it – however that works. It’s just a simple 1-field collection.

I should probably have something that catches if bogus data was entered or if the email entered is valid.

All form field validation MUST be done on the server after the form is submitted. If you don’t validate on the server then people can submit garbage in the form and you’d never know.

Any JavaScript validation added to the form is there simply to make it easier for some of those filling out the form as they can discover mistakes prior to submitting the form. It doesn’t prevent people deliberately entering garbage as they can always turn JavaScript off.

Thank you for your post, Stephen.

Anywho, if form field validation MUST be done on the server, how do I invoke that process? Do I need to write any code and post it to my web server somehow?

Then, when I have data on my web server, how can I extract that data? Do I need a .csv file?

Hey etldd,

Your question to Stephen depends on the language you’re using. Try searching Google for +form +field +validation +[language you are coding in, for example PHP]. Hope that helps you to learn, there’s no way you will effectively learn an answer to your question with a simple response on this forum. Please beware there are likely many more security concerns that you will need to address in your code as well, especially if you store submissions in a database (e.g. SQL injection attack prevention, etc.).