satsu

fmonitoring

Aug 2nd, 2015
235
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.68 KB | None | 0 0
  1. <?php
  2. include_once "ceksesi.php";
  3. $nama=$_SESSION['namauser'];
  4. $level=$_SESSION['leveluser'];
  5. $norw=$_SESSION['rw'];
  6. $nort=$_SESSION['rt'];
  7. ?>
  8. <p>Laporan Monitoring Data Warga </p>
  9. <form name="form1" method="post" action="tblmonitoring.php">
  10.   <p><a href="menu.php">Back</a></p>
  11.   <table width="15%" border="1">
  12.     <tr>
  13.       <td width="65%">
  14.       <?php
  15.        if ($level=="Super Admin")
  16.         {
  17.         echo"RW";
  18.         }
  19.         else
  20.         if ($level=="RW")
  21.         {
  22.         echo"RT";
  23.         }
  24.         else
  25.         if ($level=="RT")
  26.         {
  27.         echo"RT";
  28.         }
  29.        ?>
  30.       </td>
  31.       <td width="35%"><div align="center">
  32.         <select name="t1" id="t1">
  33.           <?php
  34.         if ($level=="Super Admin")
  35.         {
  36.         include "conn.php";
  37.         $query = mysql_query("select * from penduduk group by rw");
  38.         while($row = mysql_fetch_array($query))
  39.            {
  40.            echo "<option value=$row[rw]>$row[rw]</option>";
  41.            }
  42.         }
  43.        
  44.         else
  45.         if ($level=="RW")
  46.         {
  47.         include "conn.php";
  48.         $query = mysql_query("select * from penduduk where rw='$norw' group by rt");
  49.         while($row = mysql_fetch_array($query))
  50.            {
  51.            echo "<option value=$row[rt]>$row[rt]</option>";
  52.            }
  53.         }
  54.         else
  55.         if ($level=="RT")
  56.         {
  57.         include "conn.php";
  58.         $query = mysql_query("select * from penduduk where rt='$nort' group by rt");
  59.         while($row = mysql_fetch_array($query))
  60.            {
  61.            echo "<option value=$row[rt]>$row[rt]</option>";
  62.            }
  63.         }
  64.         ?>
  65.         </select>
  66.       </div></td>
  67.       <td width="35%"><input name="View" type="submit" id="View" value="View" /></td>
  68.     </tr>
  69.   </table>
  70. </form>
Advertisement
Add Comment
Please, Sign In to add comment