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.

Help with mail php

Discussion in 'PHP' started by nombre, Feb 13, 2009.

  1. #1
    Hi
    I bought a tutorial for a website, that has a contact form to fill in, and I have problems with the php mail file: in my personal email received from filling in the contact form of my website, does not display any information I have written in the contact form. The sequence looks like this :
    <?

    //name = _namex
    //email = _emailx
    //phone = _phonex
    //comments = _commx


    $headers = 'MIME-Version: 1.0' . "\r\n";
    $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
    $headers .= 'From: Sh Faisal' . "\r\n" .'Reply-To: myemail@gmail.com' . "\r\n";


    $ToEmail = "myemail@gmail.com";

    $ToName = "My Name";
    $ToSubject = "New email";

    $EmailBody = "<table width='716' height='207' border='1' bgcolor='#090909'>
    <tr>
    <td><font size='2' face='Arial' color='#999999'>Sent By: $_namex \nSenders Email:

    $_emailx\n Message Sent:\n$_commx</font></td>
    </tr>
    </table>";

    $EmailFooter="\nThis message was sent by: $_namex from $REMOTE_ADDR ";

    $Message = $EmailBody.$EmailFooter;

    mail($ToName." <".$ToEmail.">",$ToSubject, $Message, $headers);


    Print "_root.Status=success";

    ?>

    (I attached the image of what I received in my email, in case that would be usefull )

    If you could help me I do thank you very much
     

    Attached Files:

    nombre, Feb 13, 2009 IP
  2. Silver89

    Silver89 Notable Member

    Messages:
    2,243
    Likes Received:
    72
    Best Answers:
    0
    Trophy Points:
    205
    #2
    Where is the input form code?
     
    Silver89, Feb 13, 2009 IP
  3. khan11

    khan11 Active Member

    Messages:
    615
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    58
    #3
    user something like this for $message variable:

    
    $Message = $EmailBody.$_POST['message'].$EmailFooter;
    
    mail($ToName." <".$ToEmail.">",$ToSubject, $Message, $headers);
    
    PHP:
    where $_POST['message'] fetches the written form data, check your textarea field name and put into the $_POST[''] tags. Hope this helps.
     
    khan11, Feb 13, 2009 IP
  4. ezprint2008

    ezprint2008 Well-Known Member

    Messages:
    611
    Likes Received:
    15
    Best Answers:
    2
    Trophy Points:
    140
    Digital Goods:
    1
    #4
    if you want a new script that WORKS ..pay me and I'll put it on your site, or give you instructions on how to copy/paste the script I make for it. If you want examples of work , see signature on ezprintsolutions site etc
     
    ezprint2008, Feb 13, 2009 IP