Page 1 of 1

PHP Footer is causing problems...

Posted: Mon Feb 07, 2011 12:23 am
by doctork11
I have this PHP code that I'm confused about.

Code: Select all

<?php 
	$footer_data =<<<EOT
<script type="text/javascript">
var json_form = {$json_form};
var json_elements = {$json_element};
</script>
EOT;
	require('includes/footer.php'); 
?>
the problem is the footer. Without it, the page would load completely. With it, it brings in different information. The standard page says "Company Name" "Copyright", with this code, the footer has default information... "Your Company" "Enter Copyright"...

Here is the footer data I want, but I don't get...

Code: Select all

</div><!--end panel-->

</div><!--end container-->

<img id="bottom" src="images/bottom.png" class="fix_png"/>
<div id="footer">
<div align="center"><strong>Powered by Dot-3</strong><br />&copy; Copyright 2009-2010 Dot-3 Technology</div>
</div><!--footer-->
<?php if(!empty($footer_data)){ echo $footer_data; } ?>
</body>
</html>
Thoughts?

Re: PHP Footer is causing problems...

Posted: Mon Feb 07, 2011 1:23 am
by cpetercarter
Which is the bit which you think should put the company and copyright stuff on the page? The javascript in the code you have posted simply defines two variables - there must be something else which actually displays it. And where are the php variables $json_form and $json_element defined?