deanodino1 Posted July 29, 2013 Share Posted July 29, 2013 Could anyone explain why my script just isnt working? I dont understand PHP and would be enterally greatful. Im told Parse error: syntax error, unexpected T_ECHO in /home/content/65/11493065/html/PHP/html_form_send.php on line 265 which is the echo at the end Many thanks <?php /* subject and email variables */ $subject = 'form completion'; $to = 'office@english-centre.co.uk'; /* gathering data variable */ $name = $_POST['name']; $telephone = $_POST['telephone']; $email = $_POST['email']; $type = $_POST['type']; $ability = $_POST['ability']; $previous_lessons = $_POST['previous_lessons']; $comments = $_POST['comments']; $found_site = $_POST['found_site']; $body = <<<EOD <br><hr><br> Client Name: $name <br> Telephone: $telephone <br> Email: $email <br> Intrested in: $type <br> Current ability: $ability <br> Previous lessons: $previous_lessons <br> Any comments: $comments <br> found site through: $found_site <br> EOD; $headers = "From: $email\r\n"; $headers .= "Content-type: text/html\r\n"; $success = mail ($to, $subject, $body, $headers); /* results rendered as HTML */ $theResults = <<<EOD <HTML> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <!-- #BeginTemplate "Template.dwt" --> <head> <meta content="en-gb" http-equiv="Content-Language"> <!-- #BeginEditable "doctitle" --> <title>The English Centre 07905080578</title> <!-- #EndEditable --> <title>The English Centre</title> <link rel="stylesheet" href="../JS/gilbitron-Lean-Slider-ffe9a31/demo/style.css" type="text/css" media="screen" /> <script src="../JS/gilbitron-Lean-Slider-ffe9a31/demo/scripts/modernizr-2.6.1.min.js"></script> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script> <script src="../JS/gilbitron-Lean-Slider-ffe9a31/lean-slider.js"></script> <link rel="stylesheet" href="../JS/gilbitron-Lean-Slider-ffe9a31/lean-slider.css" type="text/css" /> <link rel="stylesheet" href="../JS/gilbitron-Lean-Slider-ffe9a31/demo/sample-styles.css" type="text/css" /> <link href="../CSS/styles.css" rel="stylesheet" type="text/css" media="screen"> <style type="text/css"> .auto-style1 { margin-bottom: 1em; } </style> </head> <body> <div id="wrapper"> <div id="top"> <div id="logo"> <img alt="English Centre" height="220" src="../Images/book-covered-in-uk.jpg" width="606"></div> <div id="language"> <h3 class="auto-style1">The English Centre </h3><br>07905080578<br> <a href="mailto:Office@english-centre.co.uk"> Office@english-centre.co.uk</a><br><br>Language Select<br><br> </div> </div> <div id="topna"> <ul> <li><a href="../default.html" class="button">Home</a></li> <li><a href="../French/default.html" class="button">About Us</a></li> <li><a href="courses.html" class="button">Courses</a></li> <li><a href="Teachers.html" class="button">Teachers</a></li> <li><a href="FAQ.html" class="button">FAQ</a></li> <li><a href="Contact.html" class="button">Contact</a></li> </ul> </div> <div class="slider-wrapper"> <div id="slider"> <div class="slide1"> <img src="../Images/big ben.jpg" alt="" /> </div> <div class="slide2"> <img src="../Images/main/hills.jpg" alt="" /> </div> <div class="slide3"> <img src="../Images/main/talking people.jpg" alt="" /> </div> <div class="slide4"> <img src="../Images/main/towerbridge.jpg" alt="" /> </div> </div> <div id="slider-direction-nav"></div> <div id="slider-control-nav"></div> </div> <script type="text/javascript"> $(document).ready(function() { var slider = $('#slider').leanSlider({ directionNav: '#slider-direction-nav', controlNav: '#slider-control-nav' }); }); </script> <div id="subbanner"> <marquee behavior="scroll" direction="left"><img alt="English lessons" height="72" src="../Images/main/scroll%20text.jpg" width="1188"></marquee> </div> <!-- #BeginEditable "Content" --> <div id="wrapper0"> <div id="content"> <h1>Contact Us</h1> <p>To find out more information complete the form and we will be in touch soon</p> <div id="form" style="width: 673px"> <form name="feedback" action="../PHP/html_form_send.php" method="post" style="width: 638px"> <ol> <li> <label for="name">Name</label> <input type="text" name="name" id="name"> </li> <li> <label for="telephone">Telephone</label> <input type="tel" name="telephone" id="telephone"> </li> <li> <label for="email">Email</label> <input type="email" name="email" id="email"> </li> <li> <label for="type">Type of Lesson</label> <select name="type"> <option value="single">Single Lessons</option> <option value="package">Lesson Package</option> <option value="friends">Learn with a Friend</option> </select></li> <li> <label for="ability">Current ability</label> <select name="ability"> <option value="beginner">Beginner</option> <option value="beyond beginner">Beyond Beginner</option> <option value="intermediate">Intermediate</option> <option value="fair">Fair</option> <option value="fluent">Fluent</option> </select></li> <li> <label for="previous_lessons">Previous Lessons?</label> <select name="previous_lessons"> <option value="no">No</option> <option value="school only">Learned only in School</option> <option value="over5years">Over 5 Years ago</option> <option value="5years">last 5 Years </option> <option value="2 years">Last 2 Years</option> <option value="pc only">Only on the Computer</option> </select></li> <li> <label for="comments">Comments</label> <textarea name="comments" style="width: 278px; height: 117px"></textarea> </li> <li> <label for="found_site">How did you find us?</label> <select name="found_site"> <option value="google">Google</option> <option value="bing">Bing</option> <option value="yahoo">Yahoo</option> <option value="gumtree">Gumtree</option> <option value="friend">Friend</option> <option value="flyer">Flyer</option> <option value="advert">Advert</option> <option value="other">Other</option> </select></li> <li> <label for="send">Send it</label> <input name="Submit1" type="submit" value="submit" /> </ol> </form> <h2 style="width: 667px"> Our goal is to help you speak fluently!</h2> </div> </div> </div> <div id="wrapper1"> <div id="rightside" style="width: 292px"> <h2> Our Other Services</h2> <ul> <li>Proofreading <li>Dissertation Writing/Proofreading <li>Essay Writing Service <li>CV Writing Service <li>Essay Writing Skills Class <li>Business Plan Writing <li>Marketing Plan Writing <li>PowerPoint Writing </ul> <p> </p> <p>If you require our other services or would like to submit a CV to work for the English Centre please use the email above</p> <img alt="Learn English" height="253" src="../Images/main/students.jpg" width="313"></h3> </div> </div> <!-- #EndEditable --> <!-- #BeginEditable "right%20side" --> <!-- #EndEditable --> <div id="footer"> <p>© Copywrite 2013 - The English Centre, London, UK</p> </div> </div> </body> <!-- #EndTemplate --> </html> EOD echo "$theResults"; ?> Quote Link to comment Share on other sites More sharing options...
TOA Posted July 29, 2013 Share Posted July 29, 2013 Looks like you forgot a ; after EOD Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.