Thread: please help
View Single Post
Join Date: Dec 2008
Posts: 5
Reputation: addsf1 is an unknown quantity at this point 
Solved Threads: 0
addsf1 addsf1 is offline Offline
Newbie Poster

please help

 
0
  #1
Dec 1st, 2008
I keep getting this message what is wrong with my sacript???

Parse error: syntax error, unexpected $end in /home/sites/thefieldinggallery.co.uk/web/contact_form.php on line 65

here is the php script:

  1. <?php
  2. /* subject and email Variables */
  3. $emailSubject = 'Crazy PHP Scripting';
  4. $webMaster = 'info@thefieldinggallery.co.uk';
  5.  
  6. /* Gathering Data Variables */
  7. $nameField = $_POST['name'];
  8. $surnameField = $_POST['surname'];
  9. $emailField = $_POST['email'];
  10. $telephoneField = $_POST['telephone'];
  11. $commentsField = $_POST['comments'];
  12.  
  13. $body = <<<em
  14. <br><hr><br>
  15. name: $name <br>
  16. surname: $surname <br>
  17. email: $email <br>
  18. telephone: $telephone <br>
  19. comments: $comments <br>
  20. EOD;
  21. $headers = "From: $email\r\n";
  22. $headers ,= "Content-type: text/html\r\n";
  23. $success = mail($webMaster, $emailSubject, $body, $headers);
  24.  
  25. /*Results rendered as HTML */
  26. $theResults = <<<EOD
  27. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  28. <html xmlns="http://www.w3.org/1999/xhtml">
  29. <head>
  30. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  31. <title>Untitled Document</title>
  32. </head>
  33. <body>
  34. <table width="50%" border="0" cellspacing="0" cellpadding="0">
  35. <tr>
  36. <td colspan="2"><img src="images/strap.jpg" alt="header" width="769" height="216" /></td>
  37. </tr>
  38. <tr>
  39. <td width="11%"><div align="center"><a href="index.html">Back to Home</a></div></td>
  40. <td width="89%"><div align="center">
  41. <p>&nbsp;</p>
  42. <p><font color="#FF0000" size="+7"><u>Thank you</u> <font color="#000000">for your we have recived you Questions / Comments and we will reply to you</font> <u>as soon as possible</u></font></p>
  43. </div></td>
  44. </tr>
  45. <tr>
  46. <td>&nbsp;</td>
  47. <td>&nbsp;</td>
  48. </tr>
  49. <tr>
  50. <td>&nbsp;</td>
  51. <td><div align="right">Copyright &copy; <a href="http://www.thefieldinggallery.co.uk">www.thefieldinggallery.co.uk</a></div></td>
  52. </tr>
  53. </table>
  54. </body>
  55. </html>
  56. EOD;
  57. echo "$theresults";
  58. ?>
Last edited by peter_budo; Dec 2nd, 2008 at 8:07 pm. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
Reply With Quote