dcsimg
www.webdeveloper.com
Results 1 to 3 of 3

Thread: Submitting form with JavaScript and php

  1. #1
    Join Date
    Oct 2012
    Posts
    5

    Submitting form with JavaScript and php

    im kind of a novice in web programming, can anyone please help. i have the form that uses java-script to divide the different sections of my form, that works fine but i need help to submit the input entered to an email address. the source for form is below:
    http://zeuspromotions.co.za/tmp/

  2. #2
    Join Date
    Feb 2013
    Posts
    2
    hi,

    bellow code may help you .

    just put this code in your form and save form with .php file

    in this ' submitted is submit button name '

    <?php
    if(isset($_POST['submitted']))
    {

    $email = $_POST['email'];

    $to = "abc@gmail.com"; // any user email id

    $subject = "any subject";

    $from_name = "abc";
    $from_email = $email;

    $headers = "MIME-Version: 1.0\n";
    $headers .= "Content-type: text/html; charset=iso-8859-1\n";
    $headers .= "From: $from_name <$from_email>\n";

    $message = '<table>
    <tr>
    <td>'.$email.'
    </td>
    </tr>
    </table>

    ';

    mail($to,$subject,$message,$headers);

    }
    ?>

    Thanks..

  3. #3
    Join Date
    Oct 2012
    Posts
    5

    Post help

    do i paste the code on the html file? what do i do about the java-script that customizes the form and handles the content? If you may please take a look on the code the link is here :http://zeuspromotions.co.za/tmp/

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles