Ok
I have a little problem through lack of knowledge that i am asking for a little bit of help with. In the first part of the coding I am calling from the MySQL data base, which is fine, however, I would love to be able to ensure all the code stays intact and if any part of it is removed it throws up an error.
PHP Code:
function fetchPageContainer($id) { global $glob, $db; $result = $db->select("SELECT * FROM ".$glob['dbprefix']."cubecart_pagecontainer WHERE id = ".$id); if($result==TRUE){ $ctext = $result[0]['ctext']; return $ctext; } else { return FALSE; } }
In another file I also include the following
PHP Code:
$custom_text = fetchPageContainer(1); $body->assign("PAGE_CONTAINER",$custom_text);
And on the page I wish to see this info i just add this
HTML Code:
<div>{PAGE_CONTAINER}</div>
Does anyone have any ideas on how to solve this issue.
|