Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Senior Coder JamieR's Avatar
    Join Date
    Oct 2004
    Location
    United Kingdom
    Posts
    3,161
    Thanks
    0
    Thanked 5 Times in 5 Posts

    Mailer script error

    hey, yo, 'lo guten tag...

    I can't seen anything immediatly obvious with this script here, but I'm getting a parse error on line 42 - any ideas anyone?

    PHP Code:
    <?php

    /*
            Jamie Mailer version 1.5
            http://www.jamierees.co.uk
            Start Date: 06/09/05
            Finish Date of current version: 06/09/05
    */

        /*variables - change these to match your requirements*/
        
        
    $name $_POST['name'];
        
    $email $_POST['email'];
        
    $body $_POST['body'];
        
    $Submit $_POST['Submit'];
        
        
    $emailTo '"Jamie Rees" <jamie@jamierees.co.uk>';

        
    $emailSubject "Message from user at Jamierees.co.uk";

        
    /*don't change anything under here unless you know what you're doing*/
        
        
    $ip $_SERVER['REMOTE_ADDR'];
        
    $browser $_SERVER['HTTP_USER_AGENT'];
        
    $host gethostbyaddr($_SERVER['REMOTE_ADDR']);

    $emailTo '"Jamie Rees" <jamie@jamierees.co.uk>';

    $emailSubject "Message from user at Jamierees.co.uk";

    $emailBody "name: $name\n"
     
    "email: $email\n"
     
    "body: $body\n"
     
    "Submit: $Submit\n"
     
    "IP Address: $ip\n"
     
    "Browser: $browser\n"
     
    "Host: $host\n"
     
    "\n"
     
    $emailHeader "From: $email\n"
     
    "Reply-To: $email\n"
     
    "MIME-Version: 1.0\n"
     
    "Content-type: text/plain; charset=\"ISO-8859-1\"\n"
     
    "Content-transfer-encoding: quoted-printable\n";

    mail($emailTo$emailSubject$emailBody$emailHeader);


    header("Location: thanks.php");
    exit;

    ?>
    Thanks,

    Jamie.

  • #2
    Regular Coder
    Join Date
    Jun 2003
    Location
    Silicon Forest
    Posts
    155
    Thanks
    0
    Thanked 5 Times in 5 Posts
    I didn't bother to count the lines but I am guessing you needed a semicolon after this statement.

    PHP Code:
    $emailBody "name: $name\n"
     
    "email: $email\n"
     
    "body: $body\n"
     
    "Submit: $Submit\n"
     
    "IP Address: $ip\n"
     
    "Browser: $browser\n"
     
    "Host: $host\n"
     
    "\n"
    Whats the point of a signature?

  • #3
    Senior Coder JamieR's Avatar
    Join Date
    Oct 2004
    Location
    United Kingdom
    Posts
    3,161
    Thanks
    0
    Thanked 5 Times in 5 Posts
    Ah.....that seems fairly obvious now , cheers.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •