Web Analytics Made Easy -
StatCounter [Solved] Recommend A Friend - CodingForum

Announcement

Collapse
No announcement yet.

[Solved] Recommend A Friend

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • [Solved] Recommend A Friend

    Code:
    <?php
    
    if($_POST['referrer']!= '')
    {$referrer = $_POST['referrer'];}
    if($_POST['fname']!= '')
    {$fname = $_POST['fname'];}
    if($_POST['femail']!= '')
    {$femail = $_POST['femail'];}
    
    $to = ''.$femail.'';
    $subject = ''.$fname.', '.$referrer.' Has A Recommendation For You...';
    $message = 'RECOMMENDATION';
    $headers = 'MIME-Version: 1.0' . "\r\n";
    $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
    $headers .= 'To: '.$fname.' <'.$femail.'>' . "\r\n";
    $headers .= 'From: '.$referrer.'' . "\r\n";
    $headers .= 'Reply-To: No Reply' . "\r\n";
    $headers .= 'X-Mailer: PHP/' . phpversion() . " \r\n";
    mail($to, $subject, $message, $headers);
    header("Location: http://www.XXX.co.uk/thanks.php");
    exit();
    
    ?>
    Hello all,

    The intention of this very stripped down mailer is that somebody enters their name (name=referrer), friends name and friends e-mail address (names=fname and femail respectively) in a form, and this script sends an e-mail to the 'femail' value recommending my site. Except, it doesn't.

    Mans, this is like learning HTML all over again ;-) What's wrong this time?
    Last edited by Pennimus; Jul 30, 2005, 08:46 AM.
Working...
X