<?php
	session_start();
	include("config.php");
	$sumber=$_SESSION["ses_admin_name"] . "(" . $_SESSION["ses_admin_id"] . ")<br/>" . $_SESSION["ses_admin_level"];
	$jawaban=mysqli_real_escape_string($mysqli,$_POST["txtJawaban"]);
	$tanggal=date("Y-m-d");

	$sql="UPDATE qa SET sumber='$sumber', tanggal_jawab='$tanggal', uraian='$jawaban', status='Y' WHERE id='$_POST[txtId]'";
	
	$qry=mysqli_query($mysqli,$sql);
	
	if($qry){
	
		msgbox("Pertanyaan berhasil dijawab.");
		lempar("admin.php?page=ls_pertanyaan&mode=moderasi&page_desc=Moderasi%20Tanya%20Jawab");
	}else{
		
		msgbox("Error: ".mysqli_error($mysqli));
		lempar("admin.php?page=ls_pertanyaan&mode=moderasi&page_desc=Moderasi%20Tanya%20Jawab");
	}
?>