Display this Parse error: syntax error, unexpected T_VARIABLE in on line 3

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • msara
    New Member
    • Feb 2008
    • 1

    #1

    Display this Parse error: syntax error, unexpected T_VARIABLE in on line 3

    I cant understand the error of this programm


    <? php

    $email = $_REQUEST['email'] ;
    $message = $_REQUEST['message'] ;

    mail( "info@premieren tals.com","Feed back Form Results",$messa ge, "From: $email" );
    header( "Location: http://www.premierentals.com/thankyou.html" );

    ?>

    <html>
    <head>
    <title>Untitl ed Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>

    <body>

    <form method="post" action="feedbac k.php">
    Email:
    <input name="email" type="text" /><br />
    Message:<br />
    <textarea name="message" rows="15" cols="40">
    </textarea><br />
    <input type="submit" />
    </form>


    </body>
    </html>
  • jenkinsloveschicken
    New Member
    • Dec 2006
    • 56

    #2
    Originally posted by msara
    I cant understand the error of this programm

    Code:
    <? php
    
        $email = $_REQUEST['email'] ; 
        $message = $_REQUEST['message'] ;
    	
    mail( "info@premierentals.com","Feedback Form Results",$message, "From: $email" ); 
        header( "Location: [url]http://www.premierentals.com/thankyou.html[/url]" );
    
    ?>
    
    <html> 
    <head> 
    <title>Untitled Document</title> 
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> 
    </head> 
    
    <body> 
    
    <form method="post" action="feedback.php"> 
    Email: 
    <input name="email" type="text" /><br /> 
    Message:<br /> 
    <textarea name="message" rows="15" cols="40"> 
    </textarea><br /> 
    <input type="submit" /> 
    </form> 
    
    
    </body> 
    </html>
    msara,

    Your parse error is due to the space in your open php tag(if this was a direct copy/paste from your code). Delete the space after the ?(ie <?php not <? php) and that should fix the parse error.

    Regards,
    Jenkins

    Comment

    Working...