can you specifie your statment ,.. you mean massy?? in works for the other function i made .... or there is some error in the function file...
see here i mabee made some stupid miss that i always do 😃
here is the hole function file
<?php
include ("../Management/mysqlcondbfm.php");
/* add main post */
function addmainpost () {
global $password,$email,$username,$post,$childetopicID,$maintopicID;
$dst = 0;
$timestamp = gmdate("Y-m-d H:i:s", time() + 3600 + $dst * 3600);
$new_post = htmlspecialchars($post);
$mainpost_insert = mysql_query("INSERT INTO mainposts VALUES ('NULL','$maintopicID','$childetopicID','NULL','$username','$email','$password','$new_post','$timestamp')");
if (mysql_error() != "") {
showheader("MySQL Error ".mysql_error());
?>
<br><p><center><b>There was a MySQL Error -- <?php echo mysql_error() ?></b></center></p>
<?php
exit;
}
}
/* delete main posts */
function deletemainpost () {
global $mainpostID;
$mainpost_deletequery = mysql_query("DELETE FROM mainposts WHERE (ID='$mainpostID')");
if (mysql_error() != "") {
showheader("MySQL Error ".mysql_error());
?>
<br><p><center><b>There was a MySQL Error -- <?php echo mysql_error() ?></b></center></p>
<?php
exit;
}
}
/* Edite main posts */
function editmainpost () {
global $mainpostID,$post;
$new_post = htmlspecialchars($post);
$mainpost_editeinsert = mysql_query("UPDATE mainposts SET post='$new_post' WHERE (ID='$mainpostID')");
if (mysql_error() != "") {
showheader("MySQL Error ".mysql_error());
?>
<br><p><center><b>There was a MySQL Error -- <?php echo mysql_error() ?></b></center></p>
<?php
exit;
}
}
/* Add childe topic */
function addchildetopic () {
global $password,$email,$username,$maintopicID,$childetopicname;
$dst = 0;
$timestamp = gmdate("Y-m-d H:i:s", time() + 3600 + $dst * 3600);
$new_post = htmlspecialchars($childetopicname);
$childetopic_insert = mysql_query("INSERT INTO childetopics VALUES ('NULL','$maintopicID','$new_post','NULL','$username','$email','$password','$timestamp')");
if (mysql_error() != "") {
showheader("MySQL Error ".mysql_error());
?>
<br><p><center><b>There was a MySQL Error -- <?php echo mysql_error() ?></b></center></p>
<?php
exit;
}
}
/* Delete childe topic and posted thred in this childe topics */
function deletechildetopic () {
global $childetopicID, $maintopicID;
$childetopic_deletequery = mysql_query("DELETE FROM childetopics WHERE (ID='$childetopicID' AND maintopicID='$maintopicID')");
$mainpost_deletequery = mysql_query("DELETE FROM mainposts WHERE (maintopicID='$maintopicID' AND childetopicID='$childetopicID')");
if (mysql_error() != "") {
?>
<br><p><center><b>There was a MySQL Error -- <?php echo mysql_error() ?></b></center></p>
<?php
exit;
}
}
function editchildetopic () {
global $maintopicID,$childetopicID,$childetopic_description;
$new_post = htmlspecialchars($childetopic_description);
$childetopic_editeinsert = mysql_query("UPDATE childetopics SET childetopicname='$new_post' WHERE (ID='$childetopicID' AND maintopicID='$maintopicID')");
if (mysql_error() != "") {
showheader("MySQL Error ".mysql_error());
?>
<br><p><center><b>There was a MySQL Error -- <?php echo mysql_error() ?></b></center></p>
<?php
exit;
}
}
function addmaintopic () {
global $password,$email,$username,$maintopicname,$maintopicdescription;
echo $username;
$dst = 0;
$timestamp = gmdate("Y-m-d H:i:s", time() + 3600 + $dst * 3600);
$new_post = htmlspecialchars($maintopicdescription);
$maintopic_insert = mysql_query("INSERT INTO maintopics VALUES ('NULL','$maintopicname','NULL','$username','$email','$password','$new_post','$timestamp')");
if (mysql_error() != "") {
showheader("MySQL Error ".mysql_error());
?>
<br><p><center><b>There was a MySQL Error -- <?php echo mysql_error() ?></b></center></p>
<?php
exit;
}
}
?>
tanks for the help budd