j05hr Posted October 24, 2009 Share Posted October 24, 2009 On my local machine I keep getting parse error for my footer. When I put it online, it doesn't show anything. I've searched on google but not found a solution for it. The error message: Parse error: parse error in C:\wamp\www\cms\includes\footer.php on line 9 <?php include("includes/header.php"); ?> <div id="content"> <h2>Estate Agent</h2> <p>We are one of the largest firms of independent Estate Agents in South Hertfordshire, with three offices covering BARNET, POTTERS BAR, BROOKMANS PARK and surrounding villages.</p> <p>Estate Agents was established with the opening of our first office in Potters Bar, March 1988. Since then we have opened a further two offices located at Brookmans Park and Barnet. We are completely independent and therefore have no hidden alliances to any Banks, Building Societies or Insurance companies, as so often is the case with Estate Agents these days.</p> </div> <?php include("includes/footer.php"); ?> Also I thought PHP isn't meant to show up in your source code? I have HTML in the include header and footer, so is it right that the HTML shows in the source code? Quote Link to comment https://forums.phpfreaks.com/topic/178835-solved-parse-error/ Share on other sites More sharing options...
tryingtolearn Posted October 24, 2009 Share Posted October 24, 2009 whats on line 9 of footer.php? The html will show up. Quote Link to comment https://forums.phpfreaks.com/topic/178835-solved-parse-error/#findComment-943446 Share on other sites More sharing options...
j05hr Posted October 24, 2009 Author Share Posted October 24, 2009 this is the code of footer.php </div> <div id="footer">Copyright 2007, Widget Corp</div> </body> </html> <?php // 5. Close connection if (isset($connection)) { mysql_close($connection); ?> Quote Link to comment https://forums.phpfreaks.com/topic/178835-solved-parse-error/#findComment-943447 Share on other sites More sharing options...
tryingtolearn Posted October 24, 2009 Share Posted October 24, 2009 Think its missing the closing bracket, try this </div> <div id="footer">Copyright 2007, Widget Corp</div> </body> </html> <?php // 5. Close connection if (isset($connection)) { mysql_close($connection); } ?> Quote Link to comment https://forums.phpfreaks.com/topic/178835-solved-parse-error/#findComment-943448 Share on other sites More sharing options...
j05hr Posted October 24, 2009 Author Share Posted October 24, 2009 Thanks, that solved it, I was looking like mad for an error in the original code I posted. Also one last thing about when you view source, should the html come up if it's in include files? You can see it at www.sampleesateagent.eu Quote Link to comment https://forums.phpfreaks.com/topic/178835-solved-parse-error/#findComment-943449 Share on other sites More sharing options...
tryingtolearn Posted October 24, 2009 Share Posted October 24, 2009 Glad it worked, Yes, the html will show. You wont see the php code but you will see the html. The includes are just taking different pages and putting them together where you include them But it wont hide the html Quote Link to comment https://forums.phpfreaks.com/topic/178835-solved-parse-error/#findComment-943452 Share on other sites More sharing options...
j05hr Posted October 24, 2009 Author Share Posted October 24, 2009 Ah ok, thanks for the help. Quote Link to comment https://forums.phpfreaks.com/topic/178835-solved-parse-error/#findComment-943454 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.