LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-02-2013, 08:23 AM   #1
littlebigman
Member
 
Registered: Aug 2008
Location: France
Posts: 660

Rep: Reputation: 35
Question 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.
 
Old 12-02-2013, 11:27 AM   #2
CincinnatiKid
Member
 
Registered: Jul 2010
Posts: 454

Rep: Reputation: 47
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.
 
Old 12-02-2013, 11:40 AM   #3
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,241

Rep: Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322
Quote:
Originally Posted by CincinnatiKid View Post
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.
 
Old 12-03-2013, 04:42 AM   #4
littlebigman
Member
 
Registered: Aug 2008
Location: France
Posts: 660

Original Poster
Rep: Reputation: 35
Thanks for the info. Is there a light, relatively spammer-proof, server-side solution?
 
Old 12-04-2013, 07:55 AM   #5
CincinnatiKid
Member
 
Registered: Jul 2010
Posts: 454

Rep: Reputation: 47
Quote:
Originally Posted by dugan View Post
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.
 
Old 12-05-2013, 04:42 AM   #6
littlebigman
Member
 
Registered: Aug 2008
Location: France
Posts: 660

Original Poster
Rep: Reputation: 35
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).
 
Old 12-05-2013, 06:04 PM   #7
CincinnatiKid
Member
 
Registered: Jul 2010
Posts: 454

Rep: Reputation: 47
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.
 
Old 12-06-2013, 08:32 AM   #8
littlebigman
Member
 
Registered: Aug 2008
Location: France
Posts: 660

Original Poster
Rep: Reputation: 35
Thanks for the suggestion. I was indeed reading about writing a short app in CGI, something like C or Freebasic.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Intel develops simpler alternative to ACPI for Linux LXer Syndicated Linux News 0 06-24-2009 06:00 AM
how to show results of a php query from a form on the main form texmansru47 Programming 2 06-27-2008 01:26 PM
PHP: build query from form entry, then display results in the same form tonedeaf1969 Programming 4 06-22-2007 07:55 AM
PhP Problems (email form) webwolf70 Programming 5 10-14-2005 05:13 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:39 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration