/    Sign up×
Community /Pin to ProfileBookmark

Sticky Data

Hello Again,

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

[code=php]

<?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’)?>
[/code]

to post a comment
PHP

0Be the first to comment 😎

×

Success!

Help @jzm spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.7,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...