Sunday, July 26, 2009

[jQuery] Re: Form mailing script

Jason wrote:
> Hi,
>
> I am new to jquery and have just created a contact form using the
> validation plugin and jquery. Everything works fine so far. My only
> issue is how do I submit this form to an email, I don't have any
> scripts etc and need a pretty secure way to do it.

You should use a server side scripting language for that. There are may
options available: PHP, RubyonRails, ASP.NET, Coldfusion, etc. jQuery is
just a client side scripting language to enhancethe user experience. The
flow of data still the same: user fill the form, form submitted, a
server script receive the data and proceess it, ex: sending it to an email.

> I also need to be able to customise the script to accept some other
> fields. The biggest bugbear for me is that I have a select box with
> different email destinations and need to send the mail to the one that
> is selected by the user. I want to have the value passed into the
> processing script to select the correct email address so I am not
> publishing it on the web.

You can handle that with a simple if in the server side.

> Has anyone done this and willing to give me some help and examples.
>
> regards
>
> Jason
>

--
Donny Kurnia
http://blog.abifathir.com
http://hantulab.blogspot.com
http://www.plurk.com/user/donnykurnia

No comments: