<?php 
    require_once('../Connections/conn_ama.php'); 
    include("../../../../../../functions/functions.php");    
	
    $curr_time = date("Y-m-d H:i:s");

    if (!isset($_SESSION)) {
    session_start();
    }

    if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "add-new-question-detail")) {

        $insertSQL = sprintf("INSERT INTO faqsquestions(sectionID, question, answer) VALUES (%s, %s, %s)",
                        GetSQLValueString(trim($_POST['sectionID']), "int"),
                        GetSQLValueString(trim($_POST['question']), "text"),
                        GetSQLValueString(trim($_POST['answer']), "text"));

        $Result1 = mysqli_query($conn_ama, $insertSQL) or die(mysqli_error($conn_ama));
            $supdeptID = mysqli_insert_id($conn_ama);
        
        if($Result1){
                
                   echo "datasent"; 
        }     
        else{
            echo "notset";
        }
       
    }
?>