mgd_create_topic

(Midgard 1.4.2 'Bifrost')

mgd_create_topic -- Create a new topic

Description

int mgd_create_topic (int up, string name, string description, string extra, int owner, string code)

Minimum version: Midgard 1.1.1

Creates a new topic record. Only owners of the parent topic (parameter up) are allowed to create new topic records.

Returns the id of the created record if successful. Returns FALSE on failure.


<?php
  $tp = mgd_create_topic(17,'Midgard Manual',
                         'A topic create example',
                         'Extra free form information',
                          1,'<?php phpinfo(); ?>');
  if(!$tp) {
    echo "Topic creation failed.<br>";
    echo "reason: " . mgd_errstr();
  } else {
    echo "Topic created";
  }
?>