Parse error: parse error in...line 36

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • littman84
    New Member
    • Aug 2006
    • 1

    #1

    Parse error: parse error in...line 36

    I'm not sure why i have this error, help :(

    [PHP]<?php

    @extract($_POST );

    $name = stripslashes($n ame);
    $email = stripslashes($e mail);
    $message = stripslashes($m essage);

    if (empty($name) || empty($email) || empty($message) )
    {

    header( "Expires: Mon, 20 Dec 1998 01:00:00 GMT" );
    header( "Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT" );
    header( "Cache-Control: no-cache, must-revalidate" );
    header( "Pragma: no-cache" );

    ?>

    <html>
    <head><title>Er ror</title></head>
    <body>
    <h1>Error</h1>
    <p>
    Oops, it appears you forgot to enter either your
    name, email address, or your message. Please press the BACK
    button in your browser and try again.
    </p>
    </body>
    </html>

    <?
    }

    else
    {
    mail(’myemail@g mail.com’, $message, "From: $name <$email>"); <--line 36
    header("locatio n:hello.htm");
    }
    ?>
    [/PHP]
  • vssp
    Contributor
    • Jul 2006
    • 268

    #2
    replace this

    else
    {
    mail('myemail@g mail.com', $message, "From: $name <$email>");
    header("locatio n:hello.htm");
    }
    and check the passing value thsi syntax
    <?php
    mail("joecool@e xample.com", "My Subject", "Line 1\nLine 2\nLine 3");
    ?>

    Comment

    Working...