Sticky Data Help

Sticky Data Not Showing By ID

Page 1 of 1

2 Replies - 757 Views - Last Post: 18 December 2010 - 02:32 PM Rate Topic: -----

#1 jzm  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 21
  • Joined: 21-March 09

Sticky Data Help

Posted 18 December 2010 - 01:01 PM

I am having an issue with the data from page ID 5 not displaying in the form, Why

<?php include('includes/header.php'); 

include('includes/class/class.form.php'); 

include('includes/class/class.page.php'); 


$iPageID = 5; 

if(isset($_GET["PageID"])){ 
     
    $iPageID = $_GET["PageID"]; 
} 

$EditedPage = new Page(); 

$EditedPage->loadPage(5); 

$apageInformation = array(); // Information From DB Sticky 
$apageInformation["name"] = $EditedPage->getPageName(); 
$apageInformation["content"] = $EditedPage->getPageContent(); 

$formEdit = new Form('editpage.php?PageID=".$iPageID', 'EditPage','return CheckEditPage();',''); 

$formEdit->setStickyData($apageInformation); 


if(isset($_POST["submit"])){ 
     
    $formEdit->setStickyData = $_POST; 
     
    $formEdit->checkNotEmpty("Name"); 
     
    $formEdit->checkNotEmpty("PageContent"); 
     
    if($formEdit->getValid() == true){ 
         
            $EditedPage->setPageName = $database->escape_value($_POST["Name"]); 
                 
            $EditedPage->setPageContent = $database->escape_value($_POST["PageContent"]); 
                 
           $EditedPage->savePage(); 
         
        $Message = "Page Updated"; 
         
    }else{ 
         
        $Message = "You Have An Error Mate"; 
    } 
} 


$formEdit->openFieldset(); 
$formEdit->makeInputBox("Name","Name","CheckInput(this.id);"); 
$formEdit->makeTextArea("Content", "PageContent", "20","70", "CheckInput(this.id);"); 
$formEdit->makeSubmitButton("submit","Edit Page"); 
$formEdit->closeFieldset(); 

$newNavigation = new Navigation(); 


?> 

     <?php echo $newNavigation->mainMenu();?> 

    <h1  class="Heading">Edit Page</h1> 

    <?php echo $Message ?> 

   <?php echo $formEdit->getHTML(); ?> 

    <?php include('includes/footer.php')?>



Is This A Good Question/Topic? 0
  • +

Replies To: Sticky Data Help

#2 JaKWaC  Icon User is offline

  • D.I.C Head

Reputation: 76
  • View blog
  • Posts: 234
  • Joined: 15-November 10

Re: Sticky Data Help

Posted 18 December 2010 - 02:16 PM

Have you done any debugging and have error reporting enabled?

You might first check to see what is being returned on this line
$EditedPage->getPageContent();


Was This Post Helpful? 0
  • +
  • -

#3 jzm  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 21
  • Joined: 21-March 09

Re: Sticky Data Help

Posted 18 December 2010 - 02:32 PM

View PostJaKWaC, on 19 December 2010 - 08:16 AM, said:

Have you done any debugging and have error reporting enabled?

You might first check to see what is being returned on this line
$EditedPage->getPageContent();



I get the following errors:

Notice: Undefined variable: aImage in /home/devnoo/public_html/Nyken/Admin/includes/class/class.page.php on line 27

Notice: Undefined property: Page::$getPageContent in /home/devnoo/public_html/Nyken/Admin/editpage.php on line 27

Notice: Undefined index: Name in /home/devnoo/public_html/Nyken/Admin/includes/class/class.form.php on line 41

Notice: Undefined index: Name in /home/devnoo/public_html/Nyken/Admin/includes/class/class.form.php on line 42

Notice: Undefined index: PageContent in /home/devnoo/public_html/Nyken/Admin/includes/class/class.form.php on line 68

Notice: Undefined index: PageContent in /home/devnoo/public_html/Nyken/Admin/includes/class/class.form.php on line 69


Could you explain to me what is happening - I think I may of missed a step.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1