By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,016 Members | 2,265 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,016 IT Pros & Developers. It's quick & easy.

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

P: 1
I cant understand the error of this programm


<? php

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

mail( "info@premierentals.com","Feedback Form Results",$message, "From: $email" );
header( "Location: http://www.premierentals.com/thankyou.html" );

?>

<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>
Feb 1 '08 #1
Share this Question
Share on Google+
1 Reply


jenkinsloveschicken
P: 56
I cant understand the error of this programm

Expand|Select|Wrap|Line Numbers
  1. <? php
  2.  
  3.     $email = $_REQUEST['email'] ; 
  4.     $message = $_REQUEST['message'] ;
  5.  
  6. mail( "info@premierentals.com","Feedback Form Results",$message, "From: $email" ); 
  7.     header( "Location: http://www.premierentals.com/thankyou.html" );
  8.  
  9. ?>
  10.  
  11. <html> 
  12. <head> 
  13. <title>Untitled Document</title> 
  14. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> 
  15. </head> 
  16.  
  17. <body> 
  18.  
  19. <form method="post" action="feedback.php"> 
  20. Email: 
  21. <input name="email" type="text" /><br /> 
  22. Message:<br /> 
  23. <textarea name="message" rows="15" cols="40"> 
  24. </textarea><br /> 
  25. <input type="submit" /> 
  26. </form> 
  27.  
  28.  
  29. </body> 
  30. </html>
  31.  
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
Feb 1 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.