<?php

session_start();

include '../config/database.php';
include_once '../config/properties.php';
include_once "../resources/forum.php";

// initialize objects
$forum = new Forum();

$id = $_SESSION['uid'];
$result = FALSE;

$response_desc = $_POST['topic_res_user'];
$topic_id = $_POST['topic_id'];
$status="Active";

$forum->topic_id = $topic_id;
$forum->user_id = $id;
$forum->response_desc = $response_desc;
$forum->status = $status;
$forum->created_ts = $date_time;
$forum->last_updated_user = $id;
$forum->last_updated_ts = $date_time;

if ($forum->insert_question_response()) {
    $result = TRUE;
}
echo $result;
?>
                                               

