Jump to content

Sticky Data Not Showing


jzm

Recommended Posts

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')?>

 

Link to comment
https://forums.phpfreaks.com/topic/222038-sticky-data-not-showing/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.