views:

57

answers:

2

I have a simple contact form that I knocked up in a few minutes using NMS FormMail.pl. But the customer has requested that I have a second email address entry field, and validation that kicks them back if the two addresses are different. I could add the validation to FormMail.pl, but before I do, I thought I'd ask if there is a better solution, if only because this might already be a solved problem, and also because nobody has modified FormMail.pl in 4+ years.

I know this server has perl and PHP, and maybe Python as well. I've also got Tomcat running, but a servlet seems like overkill for this.

+3  A: 

Far simpler to just add the validation to NMSFormMail than start again with a whole other solution. And maybe nobody's modified it because it just doesn't need modifying?

Do you need help modifying the script?

AmbroseChapel
+1  A: 

NMS FormMail.pl hasn't been modified by the original authors because it's such a simple thing. It's simply done.

I would suggest you just add a new form entry field and compare the two using Perl's string comparison operator 'eq'.

tsee
It isn't the comparing that's the problem, it's then producing some sort of error page, etc.
Paul Tomblin