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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.