ryanwood4 Posted May 2, 2010 Share Posted May 2, 2010 Hi, How do you go about including the below code on a page? I have added it to the database, and I'm using an echo function to display it, but it doesn't seem to work, is there anything special you need to do to echo code? The code I need to echo: <?php include("poll/Poll.php"); echo Poll(1, "poll/template.tpl", "poll/data.xml"); ?> I've used <? echo $poll?> to echo it, but it doesn't show anything. Thanks (not sure if that made much sense, but it's hard to explain) Quote Link to comment https://forums.phpfreaks.com/topic/200476-echoing-code-nothing-is-showing-up/ Share on other sites More sharing options...
Ken2k7 Posted May 2, 2010 Share Posted May 2, 2010 What does that function return? Also, what's $poll? And please do not use PHP short tags. Quote Link to comment https://forums.phpfreaks.com/topic/200476-echoing-code-nothing-is-showing-up/#findComment-1052011 Share on other sites More sharing options...
ryanwood4 Posted May 2, 2010 Author Share Posted May 2, 2010 The longish code is in the database under the row 'poll' - which is what I'm trying to echo - it shows up in the source, but it doesn't show up on the page. If you look at this page: http://www.thef1times.com/news/display/00001 - it doesn't show the poll at the bottom of the text (main article text), but if you check the source code, it does display the echoed code - however the code isn't doing what it would, if it was simply added to the page. Quote Link to comment https://forums.phpfreaks.com/topic/200476-echoing-code-nothing-is-showing-up/#findComment-1052020 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.