FAIL]
"); } // get data that sent from form $topic=mysql_real_escape_string($_POST['topic']); $writeperm=mysql_real_escape_string($_POST['writeperm']); $readperm=mysql_real_escape_string($_POST['readperm']); $detail=mysql_real_escape_string($_POST['detail']); $name=mysql_real_escape_string($_SESSION['user_nickname']); $avatar=mysql_real_escape_string($_SESSION['user_avatar']); $datetime=date("d-m-y H:i:s"); //create date time if($topic != "" && $detail != "") { $sql="INSERT INTO $tbl_name(topic, detail, name, avatar, w_adminonly, w_guest, r_adminonly, r_guest, datetime)VALUES('$topic', '$detail', '$name', '$avatar', "; if($writeperm=="admin"){$sql=$sql."1, ";}else{$sql=$sql."0, ";} if($writeperm=="any"){$sql=$sql."1, ";}else{$sql=$sql."0, ";} if($readperm=="admin"){$sql=$sql."1, ";}else{$sql=$sql."0, ";} if($readperm=="any"){$sql=$sql."1, ";}else{$sql=$sql."0, ";} $sql=$sql."'$datetime')"; //echo $sql; $result=mysql_query($sql); if($result) { header ("Location: ".$moduleurl."&uebergabe=0"); } else { echo "ERROR"; } } else { header ("Location: ".$moduleurl."&uebergabe=0"); } mysql_close(); ?>