<?php
 session_start();
 include "header.php";
 include "sidebar.php";
  if(!isset($_SESSION["userrpp"]))
  {
	header("Location: login.php");
  }
 
 ?>

 
  <main id="main" class="main">

    <div class="pagetitle">
      <h1>Dashboard</h1>
      <nav>
        <ol class="breadcrumb">
          <li class="breadcrumb-item"><a href="index.php">Home</a></li>
          <li class="breadcrumb-item active">Edit Data Kelas</li>
        </ol>
      </nav>
    </div><!-- End Page Title -->
    <section class="section">
      <div class="row">
        <div class="col-lg-12">
    
		 <div class="card info-card customers-card">
		 <h5 class="card-title">Edit Data Kelas</h5>
    
			
			   
                 <?php
				 if (isset($_GET['id'])) {
					include 'config.php';
					$userid=$_GET['id'];
					$result = mysqli_query($mysqli, "select * from kelas where Idkelas=$userid ");
					$res = mysqli_fetch_assoc($result);
					$nid = $res['Idkelas'];
					$nnama = $res['nama'];
				
				?>	
					
      
             
              <!-- Horizontal Form -->
              <form name="edit" method="post" action="editkelasAction.php">
                
                 <table>
                  <tr>
					<td width="100">Kode Kelas </td>
					<td> <div class="col-sm-10"> <input type="text" class="form-control" name="ikduser"  readonly value="<?php echo $nid; ?>" > </div></td>
                  </tr>
				  <tr>
					<td>Kelas</td>
					<td> <div class="col-sm-10"> <input type="text" class="form-control" name="inama"  value="<?php echo $nnama; ?>"> </td>
                  </tr>
				 <tr>
					<td></td>
					<td> <button type="submit" name="update" class="btn btn-primary">Simpan</button></td>
                  </tr>
                  </table> 
                 
                   
                
               
               
				
				
				
             
			<?php
				}	
				?>
             

            
           
        </div><!-- End Left side columns -->

      
      </div>
    </section>
<?php
 include "footer.php";
?>
 