Lists - HTML form data to email?

1st of April 2014 2

HTML form data to email?

I’m having trouble getting my form to send to my email. For some reason no matter what browser I use, when I click the submit form it asks me to download the php file. What’s the deal? Please help!



Can I just do this in javascript instead? I learned all of this stuff over a year ago and haven’t used it since so I’m incredibly rusty.

Best answer:

Answer by Toad
That’s because you don’t have PHP installed on your web server.

Try this code instead and if you don’t see the word “Hello” printed then this is confirmed.

Javascript won’t work because you need a server-side language such as PHP or Perl.

What do you think? Answer below!

Filed under § jquery forms — Tagged with , , , ,

Share it!

Was it good for you to?


Support for the site!

No sponsors at the moment.

2 great comment(s) for this post

  1. Stuart McHattie 5:36 am 1/04 of 2014

    Just as Toad said, you need to have PHP installed on the server and configured in the Apache settings. Where are you hosting this from? You should find that every commercially available web host supports PHP. The only other thing I noticed, though I may be wrong, is that you’ve not given your inputs a name attribute so they might not be recognised by the $ _REQUEST variable. I normally do something like:

    Then refer to it in the PHP as $ _REQUEST['textbox']

  2. Mr. Tacki 6:19 am 1/04 of 2014

    Your current hosting package or service MUST allow SMTP ( ) to work. Otherwise, no email can be sent.

    PHP: Sending Email Tutorial (Text/HTML/Attachments):

    Use any of the below sites to make the workable form you need:

    These are really good online form makers. Just follow the instructions for making it and uploading file(s).

    How to Make a Slick Ajax Contact Form with jQuery and PHP:

    Contact Form Generator:
    WYSIWYG Form Maker:



Your opinion matters. Add it below.

Tip: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Recent comments


Copyright since 2010. All rights reserved. Design and the Absolute Theme by Tommie Hansen.