Welcome Guest, Not a member yet? Register   Sign In
codeigniter is not parsing html from db for php tags...?
#1

[eluser]Colin McCubbin[/eluser]
I'm new to codeIgniter and an struggling with this.. :-S

If I put some php code in <?php...?> tags in amongst the html in a view file, codeigniter parses and acts on the php before sending the page to the browser with no problem.

But if I put that same block of mixed html and php in a database field and then get codeigniter to get it from the db, place it in a variable and output it, the php is not parsed and just shows up as text..

EG. I load the html helper in my controller, and in my view.php file have
Code:
<?php echo img('system/application/pics/Aragon.jpg');?>
The image shows up fine in the browser.

If however I place the same line in my db field and get that and output it, it jus appear as a text string... So I get no image in the page, and if I 'view source' I see the php tags in the source..

What am I doing wrong here? Do I have to pass the db contents back into the php parser somehow? I'd have thought that codeigniter would have done that..

Thanks!


Messages In This Thread
codeigniter is not parsing html from db for php tags...? - by El Forum - 01-02-2009, 07:21 PM



Theme © iAndrew 2016 - Forum software by © MyBB