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.

Need help with friends code

Discussion in 'HTML & Website Design' started by macstux, Dec 10, 2016.

  1. #1
    This is my friends code http://pastebin.com/RdFL2Xgf he uses on a VPS hosting. I am trying to add it to my hosting which isnt VPS. The problem i am having is I dont know how to make the information get sent to my email. Hoping you great programmers can help me out :)
     
    macstux, Dec 10, 2016 IP
  2. Fiverscripts

    Fiverscripts Moderator Staff

    Messages:
    1,839
    Likes Received:
    42
    Best Answers:
    1
    Trophy Points:
    370
    #2
    Just taking a look..seems like its writing it to a log:

    $.post('/submit', formData, function(res) {
                console.log(res);
                $("#offer").modal('hide');
                $("#thankYou").modal('show');
            });
    Code (markup):
    This section of code.. is putting all of the data into "res" and logging it - so what you would need to do is use something like PHPmail:

    http://stackoverflow.com/questions/5335273/how-to-send-an-email-using-php

    set it up to send you an email with the data on instead.. if i have some time later will wack up an example for you - in meantime if any other fellow DP members want to code it up/suggest better thats cool
     
    Fiverscripts, Dec 10, 2016 IP
  3. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #3
    Eh... it logs what is being RETURNED from /submit, not what is sent. The /submit (whatever is running there) is what parses the content of the form, and sends mail etc. I'm guessing mail(), PHPMailer, or some other incarnation of PHP sending mail.
     
    PoPSiCLe, Dec 12, 2016 IP