mgd_update_page

(Midgard 1.4.2 'Bifrost')

mgd_update_page -- Update a page record

Description

bool mgd_update_page (int id, string name, int style, string title, string content, int author, int auth, int active)

Minimum version: Midgard 1.2.5 (Mad King)

Updates the page record with id id with the provided parameters.

Returns TRUE if successful. Returns FALSE on failure.


<?php
 $id      = 127;
 $name    = "phpinfo";
 $style   = 17;
 $title   = "PHP Information";
 $content = '<?php phpinfo(); ?>';
 $author  = 13;
 $auth    = 0;
 $active  = 1;

 mgd_update_page( $id, $name, $style, $title, $content,
                  $author, $auth, $active);
 $err = mgd_errno();
 if( $err ) {
   echo "Could not update page.<br>";
   echo "reason: " . mgd_errstr( $err );
 } else {
   echo "Updated page.";
 }
?>