SourceForge Logo
1.6.4: add_topic


Description
This functions adds a topic to the database.


Function call
add_topic ($tid, $username, $password, $ttitle, $text, $icon, $enable_smilies, $mail_on_reply);

Input
The function of the parameters is:

ParameterDescription
$tidThe ID of the topic to add.
$usernameThe username of the user who has rights to edit the topic.
$passwordThe password belonging to the user.
$ttitleThe title of the topic
$textThe text of the first post in the topic.
$iconthe ID of the icon belonging to the first post.
$enable_smilies"1" if smilies are enabled, "0" if not.
$mail_on_reply"1" if mail on reply is enabled, "0" if not.


Output
The output is the result of the add. Each resultvalue has the following description:

ValueDescription
0No errors, topic succesfully added.
1User not logged in.
2No or invalid ttitle given.
3No or invalid text given.
4No sid given.
5Invalid sid given.
9Unknown database error.

« Previous | Index | Next »