<?php 
include '../koneksi.php';
$id  = $_POST['id'];


$nama  = $_POST['nama'];
$nis = $_POST['nis'];
$jurusan = $_POST['jurusan'];
$pwd = md5($_POST['password']);
$password = md5($pwd);
$status = $_POST['status'];

if($pwd == ""){
	mysqli_query($koneksi, "update siswa set siswa_nama='$nama', siswa_nis='$nis', siswa_jurusan='$jurusan', siswa_status='$status' where siswa_id='$id'");
	header("location:siswa.php");
}else{
	mysqli_query($koneksi, "update siswa set siswa_nama='$nama', siswa_nis='$nis', siswa_jurusan='$jurusan', siswa_password='$password', siswa_status='$status' where siswa_id='$id'");
	header("location:siswa.php");
}
