$c->c_o_ID = $_GET['id']; $c->c_authorID = $_SESSION['u_id']; $c->c_text = $_POST["text"]; $c->c_type = 0; $c->c_time = date('Y-m-d H:i:s'); $c->create(); redirect_to("forums2.php"); } if (isset($_POST['submit1'])) { $c = new comments(); $c->c_o_ID = $_GET['id']; $c->c_authorID = $_SESSION['u_id']; $c->c_text = $_POST["text"]; $c->c_type = 1; $c->c_time = date('Y-m-d H:i:s'); $c->create(); redirect_to("forums2.php"); } $sql = "SELECT * FROM comment ORDER BY c_id desc limit 1"; $result_set = $database->execute_query($sql); $row = $database->fetch_array($result_set); $c_id = array_shift($row); ?> <meta http-equiv="content-type" content="text/html;charset=UTF-8" /><!-- /Added by HTTrack --> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Debate Club</title>