1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

How to E-mail Form Data

Discussion in 'HTML & Website Design' started by anemoneaspark, Jul 12, 2013.

  1. #1
    Hi there. New here.

    I have this free form:
    http://members.optuszoo.com.au/~renmarkholiday/form/form.html
    But I can't figure how to get it to e-mail input information to my e-mail account.
    I see <form id="form_667084" class="appnitro" method="post"
    action=""> Which I have learnt "" means the information is submitted to the page to process?

    If I change this to method="GET" action="mailto:myemail" it doesn't seem to help.

    Any ideas. Also when the page refreshes, can I get it to display "Complete!"
    or an image or something nice?

    Thanks a heap! Trying to fancy up an old site.
     

    Attached Files:

    anemoneaspark, Jul 12, 2013 IP
  2. anemoneaspark

    anemoneaspark Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #2
    guessing I am missing the .php side of it, the more I look into it.
    if this javascript file helping?

    EDITED:

    Ok I have tried to make a .php it is freaking horrible I know.
    I don't know what i'm doing. Any help appreciated.

    http://members.optuszoo.com.au/~renmarkholiday/form.html
    Click send enquiry or: http://members.optuszoo.com.au/~renmarkholiday/send_form_email.php
     
    Last edited: Jul 12, 2013
    anemoneaspark, Jul 12, 2013 IP
  3. abhijitnumber1

    abhijitnumber1 Member

    Messages:
    19
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    38
    #3
    if you want to send your form data as email. then you can use php mail function to send email.

    <?php
    if(isset($_POST['user_name']) && isset($_POST['email']))
    {
     
        $user_name = $_POST['user_name'];
        $email = $_POST['email'];
     
        if(!empty($user_name) && !empty($email))
        {
            mail($email, "This is the email subject", "Your message");
        }
    }
    else
    {
     
    echo '<form action="" method="post">';
    echo 'user name:<input type="text" name="user_name">';
    echo 'E-mail To: <input type="email" name="email">';
    echo '<input type="submit" value="Send E-mail">';
    echo '</form>';
    }
    ?>
    PHP:
    This is how you can send email
     
    abhijitnumber1, Jul 12, 2013 IP
  4. anemoneaspark

    anemoneaspark Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #4

    That will work for this particular form?

    EDITED:

    I have tried to make a .php it is freaking horrible I know.
    I don't know what i'm doing. Any help appreciated.

    http://members.optuszoo.com.au/~renmarkholiday/form.html
    Click send enquiry or: http://members.optuszoo.com.au/~renmarkholiday/send_form_email.php

    here is the original:

    http://codepen.io/anon/pen/ioyLl
     
    Last edited: Jul 12, 2013
    anemoneaspark, Jul 12, 2013 IP
  5. abhijitnumber1

    abhijitnumber1 Member

    Messages:
    19
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    38
    #5
    Look, I don't have time to view full code. Just tell me what type of error you are getting.

    and one more thing, send_form_email.php is readable by any outside user, and that is not good for you, if you are storing data in database. so, change the file to 644 permission.

    if you want then i can create a form as you required just PM me.
     
    abhijitnumber1, Jul 12, 2013 IP