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.

Help with simple send to my email form!

Discussion in 'HTML & Website Design' started by LoveKey, Jun 5, 2011.

  1. #1
    Hello guys,
    SEMrush
    Can anyone help me with a simple form.

    I need a form like this:

    A box where the user can enter his email adress.

    Under it a button: Send this to my email

    The function will be that a certain text is sent to his email adress.
    The text is one I choose before.

    Thanks guys!
     
    LoveKey, Jun 5, 2011 IP
    SEMrush
  2. LoveKey

    LoveKey Peon

    Messages:
    41
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Ok...can you tell me why this doesn't work?

    <?php
    
    $EmailTo = $_REQUEST['email'];
    $Subject = "Coupon emailed by you from SpidaNet";
    $email = "talmacelmarian@webstylecreator.com"; 
    
    $refered_from = $_SERVER['HTTP_REFERER'];
    
    $Body = "";
    $Body = "You wanted to get this coupon sent to you by email!";
    $Body .= "\n";
    $Body .= "\n";
    $Body .= "You can get it by clicking this link: http://www.paydayadvanceuk.co.uk/news/wp-content/uploads/2011/04/coupon.jpg";
    $Body .= "\n";
    $Body .= "$refered_from";
    
    $success = mail($EmailTo, $Subject, $Body, "From: <$email>", "-talmacelmarian@webstylecreator.com");
    ?>
    
    
    
    
    
    
    
    HTML
    
          <form method="post" action="feedback1.php"
     id="friendform" name="friendform"> <font
     style="color: black;" size="-1"><label
     style="font-weight: bold;" for="email">Email me the
    coupon! <br>
    (You must enter your email) </label></font>
            <input name="email" type="text"><br>
            <input name="submit" value="Send now!"
     type="submit">&nbsp;&nbsp;&nbsp;<input
     name="reset" type="reset">
          </form>
    Code (markup):
     
    LoveKey, Jun 5, 2011 IP
  3. Arrowhead

    Arrowhead Peon

    Messages:
    70
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    html form looks okay to me..but your code is terribly messy..
    also consider moving this to the php section perhaps.
     
    Arrowhead, Jun 5, 2011 IP
  4. webdesignbarrie

    webdesignbarrie Peon

    Messages:
    15
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Does it give you a php error? if so, post it here. if not, echo out your mail() line to ensure that everything that you're passing PHP is correct. also, not sure about your syntax at the end of that line. try rewriting it with mail headers as shown in the example on the php website:

    <?php
    $to = 'nobody@example.com';
    $subject = 'the subject';
    $message = 'hello';
    $headers = 'From: ' . "\r\n" .
    'Reply-To: ' . "\r\n" .
    'X-Mailer: PHP/' . phpversion();

    mail($to, $subject, $message, $headers);
    ?>
     
    webdesignbarrie, Jun 9, 2011 IP
  5. woody allen

    woody allen Peon

    Messages:
    263
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    emailmeform.com is the place u wanna go, I've been using it for quite some time. It has a 200 email limit though.
     
    woody allen, Jun 9, 2011 IP