simple onlcick question

Discussion in 'JavaScript' started by kuttappan, Jun 9, 2010.

  1. #1
    What I want is that i can have a link <a> with an onclick, and when the person clicks it, an email gets sent to $email with a certain message. I can send messages in PHP, that's not the problem, but I wan't do it in javascript, and even if I could I wouldn't be able to do it safely.
     
    kuttappan, Jun 9, 2010 IP
  2. listener86

    listener86 Peon

    Messages:
    16
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Use AJAX. Make a request to php script, it will send email and returns some answer. Make a hook, to show message on getting reply from php script.
     
    listener86, Jun 9, 2010 IP