I am looking for a form to email link to the visitor.

Discussion in 'PHP' started by chetanmadaan, May 28, 2009.

  1. #1
    guys... i am looking for a php form in which users should enter their name and email And a link should be sent to the email address entered by the user.

    this should be a same link for every users or can be different as per session id... (if possible)

    Thanks!
     
    chetanmadaan, May 28, 2009 IP
  2. shah2k

    shah2k Peon

    Messages:
    502
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    <?
    $subject = "Mail from us"
    $link = "Enter your link here";
    $name = $_POST['name'];
    $email = $_POST['email'];

    //do some email validation..google it if you need help

    $result = mail($email, $subject, $link) or die("Could not send email");
    echo "Thank you. Please check your email";
    ?>

    this is a very basic one but it should work...
     
    shah2k, May 29, 2009 IP
  3. Bohra

    Bohra Prominent Member

    Messages:
    12,573
    Likes Received:
    537
    Best Answers:
    0
    Trophy Points:
    310
    #3
    And offcourse the above code will work if phpmail is is enabled
     
    Bohra, May 29, 2009 IP
  4. shah2k

    shah2k Peon

    Messages:
    502
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #4
    which is enabled by default...
     
    shah2k, May 29, 2009 IP