Help in adding mail this page code to php page

Discussion in 'PHP' started by calmer, Apr 14, 2010.

  1. #1
    Hello every one,

    I hope one of php experts assist me for adding a code (java, html, or any othe language code) to a php page, so the user can click on a button to send the page with it's content to a certain email address.

    I tried to add a java code of send this page but the receiver just receive the page link not the content.

    Your assistance is highly appreciated.
     
    calmer, Apr 14, 2010 IP
  2. mfscripts

    mfscripts Banned

    Messages:
    319
    Likes Received:
    4
    Best Answers:
    8
    Trophy Points:
    90
    Digital Goods:
    3
    #2
    What code do you have so far?
     
    mfscripts, Apr 14, 2010 IP
  3. alberrambo

    alberrambo Peon

    Messages:
    29
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    tell the code here.
     
    alberrambo, Apr 14, 2010 IP
  4. calmer

    calmer Peon

    Messages:
    179
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Thanks ...

    The java code which I used is:

    --------------
    <SCRIPT LANGUAGE="JavaScript">

    <!-- Begin
    function initMail(form) {
    text = "Check out this page: " + window.location;
    form.message.value = "Hi " + form.sendto.value + " (" + form.to.value + "):\n\n"
    + text + "\n\nYour Friend,\n" + form.sendername.value + "(" + form.senderemail.value + ")";
    return (form.to.value!= "");
    }
    // End -->
    </script>
    </HEAD>

    <!-- STEP TWO: Copy this code into the BODY of your HTML document -->

    <BODY>

    <center>
    <form name=emailform method=post action="http://cgi.freedback.com/mail.pl" target="_new" onSubmit="return initMail(this);">
    <input type=hidden name=subject value="** Check Out this Site! **">
    <input type=hidden name=message value="">
    <table>
    <tr><td colspan=2 align=center>Tell a friend about this page!</td></tr>
    <tr><td>Their Name:</td><td><input type=text name=sendto></td></tr>
    <tr><td>Their email:</td><td><input type=text name=to></td></tr>
    <tr><td>Your Name:</td><td><input type=text name=sendername></td></tr>
    <tr><td>Your email:</td><td><input type=text name=senderemail></td></tr>
    <tr><td colspan=2 align=center><input type=submit value="Ok!"></td></tr>
    </table>
    </form>
    </center>
    ------------------------------
     
    calmer, Apr 15, 2010 IP