LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Simpler alternative to PHP to handle email form? (https://www.linuxquestions.org/questions/linux-software-2/simpler-alternative-to-php-to-handle-email-form-4175486547/)

littlebigman 12-02-2013 08:23 AM

Simpler alternative to PHP to handle email form?
 
Hello

For a very basic brochure site, I need to add an email form.

Is there a lighter alternative to PHP just to read and validate the few parameters (email + subject + body) and send the email?

Thank you.

CincinnatiKid 12-02-2013 11:27 AM

You can use Javascript for the form validation if you don't mind doing it on the client side. Honestly I don't think you will get a much lighter alternative for emailing the form, that's just my opinion though. Let me know if you need help with the Javascript portion.

dugan 12-02-2013 11:40 AM

Quote:

Originally Posted by CincinnatiKid (Post 5073988)
You can use Javascript for the form validation if you don't mind doing it on the client side. Honestly I don't think you will get a much lighter alternative for emailing the form, that's just my opinion though. Let me know if you need help with the Javascript portion.

That works great until attackers use CURL to submit the forms.

Or you get a visitor with JavaScript turned off.

littlebigman 12-03-2013 04:42 AM

Thanks for the info. Is there a light, relatively spammer-proof, server-side solution?

CincinnatiKid 12-04-2013 07:55 AM

Quote:

Originally Posted by dugan (Post 5073994)
That works great until attackers use CURL to submit the forms.

Or you get a visitor with JavaScript turned off.

I never said is was the ideal solution, but it is worth considering. BTW, PHP form validation will not stop attackers/robots from submitting your form.

What is your defenion of "light"? Do you mean less coding, or lighter on CPU usage? I don't really think you need to worry about that.

littlebigman 12-05-2013 04:42 AM

I meant a solution that doesn't require installing the whole of PHP simply to read input fields and send an e-mail, including some basic CAPTCHA (eg. "what is ten + six" type).

CincinnatiKid 12-05-2013 06:04 PM

I have been a web developer for years, and unfortunately I don't think there is any way to go lighter. You are basically going to need a server side language; there are a bunch to choose from, but you are going to have to install something. CGI or Perl might be lighter than PHP, you can give them a shot.

littlebigman 12-06-2013 08:32 AM

Thanks for the suggestion. I was indeed reading about writing a short app in CGI, something like C or Freebasic.


All times are GMT -5. The time now is 10:42 PM.