<?php
require("../../config/koneksi.php");
require("../../config/function.php");
require("../../config/crud.php");
cek_session_admin();
(isset($_GET['pg'])) ? $pg = $_GET['pg'] : $pg = '';
if ($pg == 'kembali') {
   $mapelQ = mysqli_query($koneksi, "SELECT * from hasil_jawaban ");
	while ($jawab = mysqli_fetch_array($mapelQ)) {
		$jawab_essai = addslashes($jawab['esai']);
		$exec = mysqli_query($koneksi, "INSERT INTO jawaban (id_siswa,id_bank,id_soal,jawaban,jenis,esai,nilai_esai,ragu,id_ujian,jawabx,jawabmulti,jawabbs,jawaburut,bs1,bs2,bs3,bs4,bs5,urut1,urut2,urut3,urut4,urut5)VALUES('$jawab[id_siswa]','$jawab[id_bank]','$jawab[id_soal]','$jawab[jawaban]','$jawab[jenis]','$jawab_essai','$jawab[nilai_esai]','$jawab[ragu]','$jawab[id_ujian]','$jawab[jawabx]','$jawab[jawabmulti]','$jawab[jawabbs]','$jawab[jawaburut]','$jawab[bs1]','$jawab[bs2]','$jawab[bs3]','$jawab[bs4]','$jawab[bs5]','$jawab[urut1]','$jawab[urut2]','$jawab[urut3]','$jawab[urut4]','$jawab[urut5]')");
	}
	$exec = mysqli_query($koneksi, "DELETE FROM hasil_jawaban");
echo $exec;
}

