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!

HTML:




formTest.php:

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.

Edit:
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?

Sponsors

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']

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

    Your current hosting package or service MUST allow SMTP ( http://en.wikipedia.org/wiki/Simple_Mail_Transfer_Protocol ) to work. Otherwise, no email can be sent.

    PHP: Sending Email Tutorial (Text/HTML/Attachments): http://www.webcheatsheet.com/php/send_email_text_html_attachment.php

    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: http://www.elated.com/articles/slick-ajax-contact-form-jquery-php/

    Contact Form Generator: http://www.tele-pro.co.uk/scripts/contact_form/
    WYSIWYG Form Maker: http://www.jotform.com/?gclid=CNKhqei1wJ4CFRQhnAod6laUqA
    http://www.thesitewizard.com/wizards/feedbackform.shtml
    http://www.form2email.net/
    http://www.phpform.org/

    http://www.thepcmanwebsite.com/form_mail.shtml
    http://emailmeform.com/

    More…

    Reply

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

Categories



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