<?php
	include("config.php");
	
	
	if(!empty($_POST['chkhapus'])){
		
		foreach($_POST['chkhapus'] as $idqa){
			//echo $idqa."</br>";
			$sql="DELETE FROM qa WHERE id='$idqa'";
			$qry=mysqli_query($mysqli,$sql);
		}
	}
	
	
	if($qry){
	
		msgbox("Data tanya jawab berhasil dihapus");
		lempar("admin.php?page=ls_pertanyaan&mode=moderasi&page_desc=Moderasi Tanya Jawab");
	}else{
		
		msgbox("Error: ".mysqli_error($mysqli));
		lempar("admin.php?page=ls_pertanyaan&mode=moderasi&page_desc=Moderasi Tanya Jawab");
	}
	
	
	
?>