simple submit email form needed

Discussion in 'Programming' started by horseygirl, Nov 11, 2008.

  1. #1
    i need a simple submit email form with submit button

    on submit the email will be saved and the user passed to a new page of my site

    any one help please
     
    horseygirl, Nov 11, 2008 IP
  2. shineDarkly

    shineDarkly Banned

    Messages:
    241
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #2
    i can do this for you for a small fee $10 perhaps?
     
    shineDarkly, Nov 11, 2008 IP
  3. joxtechnology

    joxtechnology Peon

    Messages:
    146
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    this just a simple script no need to charge a fee
     
    joxtechnology, Nov 11, 2008 IP
  4. adservermods

    adservermods Peon

    Messages:
    42
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    <FORM action="http://yoursite.com/pagenamer" method="post">
    <P>
    First name: <INPUT type="text" name="firstname"><BR>
    Last name: <INPUT type="text" name="lastname"><BR>
    email: <INPUT type="text" name="email"><BR>
    <INPUT type="submit" value="Send"> <INPUT type="reset">
    </P>
    </FORM>]

    This is the html page where in the action tag you can mention the url of the page you want to go after the submit.

    Write the sql code for update.
     
    adservermods, Nov 11, 2008 IP
  5. PhantomLegend

    PhantomLegend Guest

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    If you want a form that sends you an email using php, here is a small script.

    HTML Form (same as adservermods just modified a little bit):

    <FORM action="email.php" method="post">
    <P>
    <p>First name:<br /><INPUT type="text" name="firstname" /></p>
    <p>Last name:<br /><INPUT type="text" name="lastname" /></p>
    <p>Email Address:<br /><INPUT type="text" name="email" /></p>
    <p>Message:<br /><textarea name="message" rows="6" cols="25"></textarea></p>
    <INPUT type="submit" value="Send" /> <INPUT type="reset" />
    </P>
    </FORM>
    HTML:

    PHP Form Handler (very basic with just a little bit of validation):

    <?php
    
        if (!empty($_POST['firstname']) && !empty($_POST['lastname']) && !empty($_POST['email']) && !empty($_POST['message']) ) {
    
            $name = $_POST['firstname'] . $_POST['lastname'];
    
            $body = "Email from: $name\n\nMessage:\n\n{$_POST['message']}";
    
            $body = wordwrap($body, 70);
    
    	// Fill in your info here...
    
            mail('youremailaddresshere', 'titleofemailhere', $body, "FROM: {$_POST['email']}");
    
            echo '<p>We will get back to you shortly</p>';
    
        } else {
    
            echo '<p>Please fill out the form completely.</p>';
    
        }
    
    ?>
    PHP:
    You might want to consider using more validation. Otherwise, this simple script should work.
     
    PhantomLegend, Nov 12, 2008 IP
  6. gummyworms

    gummyworms Active Member

    Messages:
    126
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    53
    #6
    does the server actually send the email in this one
     
    gummyworms, Nov 17, 2008 IP
  7. DesignSamples

    DesignSamples Banned

    Messages:
    170
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #7
    She wants to gather the email address prior to redirecting to new page. So do you want the emails stored in a database, flat file or simply emailed to you?
     
    DesignSamples, Nov 21, 2008 IP