Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if(isset($_GET['id'])){
- $id=$_GET['id'];
- $is_soal = true;
- $query="select id_soal from tabel_soal where id_soal='$id'";
- $result = mysql_query($query);
- $rows = mysql_num_rows($result);
- if($rows!=1) { // hanya boleh ada 1row
- echo "<script> document.location.href='./home.php?status=Soal belum dibuat!'; </script>";
- } else {
- list($id_soal) = mysql_fetch_row($result);
- mysql_free_result($result);
- $_SESSION['id_soal']=$id_soal;
- echo "<script> document.location.href='soal/t_soal.php'; </script>";
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment