Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Send To A Friend form

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #24533
    Luminated
    Member

    Hi All,

    I’ve been requested to create a "Send To A Friend" form for a client…can’t say I know entirely how to do this. Example:

    http://www.lee-associates.com/global/properties_details.php?saleLease=forSale&propertyLocationState=-1&ForSaleLooplinkSubmit=Search&StateSelect=1&lease=1&__utma=165464866.6399789.1238386077.1238386077.1238386077.1&__utmb=165464866&__utmc=165464866&__utmz=165464866.1238386077.1.1.utmccn%3D%28direct%29%7Cutmcsr%3D%28direct%29%7Cutmcmd%3D%28none%29&page=1&id=43385

    I’m not extremely PHP savvy but I’ve done enough tooling with shopping carts and CMS to know how to hack it up…but this one is surprisingly complicated! Any help is appreciated. :mrgreen:

    #55980
    ikthius
    Member

    Sorry My superhuman superpower of reading minds has left me for tonight as the superpower is in for its annual service.

    but send what to a friend?
    Who is the friend?

    that page you linked to is just a property for sale page…. I think

    if this is the page you want the send link to friend, then why dont you make a contact form with only a field for the persons email.

    then in the PHP get the referring page link then send that in the body of your email:

    example…. and only an example, not fully tested PHP friendcontact.php:

    Code:
    “, “[email protected]”);
    ?>

    HTML something like this:

    Code:


       
    #55995
    Luminated
    Member

    So sorry, my brain was closer to a stack overflow than I thought when I posted this! ;)

    Basically, the client, who is a real estate agent (not this company but another, this is just the example he sent me) wants a link on each listing page that says "Send this page to a friend." When they click the link, it will bring them to a little form that they will end up filling out their name and the recipient’s e-mail and it will e-mail the page to the ‘friend.’ I assume to do this, I need to know the hosts’s formmail script since I assume it calls on similar functions to send the e-mail. Aside from knowing that, I’m not versed enough to really be able to code this myself.

    Is this a better explanation or is my brain as fried as it feels today?

    #56014
    ikthius
    Member
    "Luminated" wrote:
    So sorry, my brain was closer to a stack overflow than I thought when I posted this! ;)

    Basically, the client, who is a real estate agent (not this company but another, this is just the example he sent me) wants a link on each listing page that says "Send this page to a friend." When they click the link, it will bring them to a little form that they will end up filling out their name and the recipient’s e-mail and it will e-mail the page to the ‘friend.’ I assume to do this, I need to know the hosts’s formmail script since I assume it calls on similar functions to send the e-mail. Aside from knowing that, I’m not versed enough to really be able to code this myself.

    Is this a better explanation or is my brain as fried as it feels today?

    make the form as you want it to look.

    I would have the form on the page, and send from there.

    mail($EmailTo, $Subject, $Body, "From: <$email>", "[email protected]");
    is the mail function, this really is all you need, however, I have never got it to work without the -f you need this for your root email that its working from.

    the rest of the script is getting the values of the contact form, populating the body of the email, etc.

    what I gave you was basic, but you could add in other stuff like if it was successful, send the real estate agent an email also, so that they could follow up a lead

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘Back End’ is closed to new topics and replies.