Send form to email in url

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • phillipmcgough@charter.net

    Send form to email in url

    I need to know how I can have a form sent to an email that is in a URL.

    For example:
    If I have a site with a form that has
    First Name:
    Last Name:
    Email:
    Phone:

    in it, and a person goes to www.test.com/?email@emailaddress.com (or
    something like that)then I need the form results to go to that email
    address in the URL.

    If a different person has a person go to the same URL but uses a
    different email address, then the results of the form need to go to
    that email address.

    I also want it to send it without opening up a seperate email program
    (outlook, etc.)

    Hope this make sense.

    Thanks!

  • Noodle

    #2
    Re: Send form to email in url


    phillipmcgough@ charter.net wrote:
    I need to know how I can have a form sent to an email that is in a URL.
    >
    For example:
    If I have a site with a form that has
    First Name:
    Last Name:
    Email:
    Phone:
    >
    in it, and a person goes to www.test.com/?email@emailaddress.com (or
    something like that)then I need the form results to go to that email
    address in the URL.
    >
    If a different person has a person go to the same URL but uses a
    different email address, then the results of the form need to go to
    that email address.
    >
    I also want it to send it without opening up a seperate email program
    (outlook, etc.)
    >
    Hope this make sense.
    >
    Thanks!
    <?php
    mail($_REQUEST['email'], 'my subject', 'the message');
    ?>

    See http://au2.php.net/function.mail

    Comment

    • Miguel Cruz

      #3
      Re: Send form to email in url

      phillipmcgough@ charter.net wrote:
      I need to know how I can have a form sent to an email that is in a URL.
      >
      For example:
      If I have a site with a form that has
      First Name:
      Last Name:
      Email:
      Phone:
      >
      in it, and a person goes to www.test.com/?email@emailaddress.com (or
      something like that)then I need the form results to go to that email
      address in the URL.
      Make sure you have strict length controls on the fields that get
      included in the email message, and run strip_tags() on them, or else you
      will find your form being abused for spam on quite short order.

      miguel
      --
      Photos from 40 countries on 5 continents: http://travel.u.nu
      Latest photos: Malaysia; Thailand; Singapore; Spain; Morocco
      Airports of the world: http://airport.u.nu

      Comment

      Working...