<?php
session_start();
include  "../koneksi/koneksi.php";

$id = $_GET['id'];

$sql = "UPDATE pertanyaan set status='1' WHERE id='$id'";

$proses = mysql_query($sql);
	if ($proses) {
	$sql2 = mysql_query("UPDATE pertanyaan set status='0' WHERE id_user='$_SESSION[id]' AND id!='$id'");
	header('location:../pertanyaan.php?sukses='.base64_encode("pertanyaan telah diaktifkan").'');
	} else { echo "Data belum dapat di simpan!!"; 
	}
?>

