Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
A little bit of php help needed
Old 03-07-2008, 03:13 PM A little bit of php help needed
Average Talker

Posts: 16
Name: Richard
Trades: 0
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.
Demon Templates is offline
Reply With Quote
View Public Profile Visit Demon Templates's homepage!
 
 
Register now for full access!
Old 03-07-2008, 04:03 PM Re: A little bit of php help needed
choskins102's Avatar
Super Talker

Posts: 137
Name: Casey
Trades: 3
What kind of error are you getting?
choskins102 is offline
Reply With Quote
View Public Profile
 
Old 03-07-2008, 04:53 PM Re: A little bit of php help needed
Average Talker

Posts: 16
Name: Richard
Trades: 0
Hi

Opps, sorry.

What I meant to come across was if any of that code was removed it would GENERATE an ERROR.

Sorry for the confusion.
Demon Templates is offline
Reply With Quote
View Public Profile Visit Demon Templates's homepage!
 
Reply     « Reply to A little bit of php help needed
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.13734 seconds with 12 queries