<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js"></script>
  <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="css/bootstrap.min.css"/>
  <title>Kolej Vokasional Sepang - E-Vote</title>
</head>



<body>
   
 <div class="container">
    <nav class="navbar navbar-default">
 <h1>KVS Digital - VOTING SYSTEM</h1>
    <ul class="nav navbar-nav">
      <li class="active"><a href="index.html">Home</a></li>
      <li><a href="login.html">Undian</a></li>
      <li><a href="admin.html">Admin</a></li>
    </ul>


  </nav>

<?php
      

include 'dbconn.php';

$studentIC=$_POST["icpelajar"];
echo $student;
$q = "select * from tblstudent WHERE studentIC='$studentIC'";
$query = mysqli_query($conn,$q);
$count1=mysqli_num_rows($query);
if($count1 ==1){
   
    $row1 = mysqli_fetch_assoc($query);
    $IC = $row1['studentIC'];
 
    $name = $row1['studentName'];
    $voteStatus = $row1['voteStatus'];
?>
    <form name="update" method="post" action="update1.php">
        <input type="hidden" name="var1" value="<?=$studentIC?>"/>
        NO KAD PENGENALAN : <input type="text" name="studentIC" value="<?php echo $IC;?>"><br><br>
        NAMA :   <input type="text" name="studentName" value="<?php echo $name;?>"><br><br>
        Vote Status :   <input type="text" name="voteStatus" value="<?php echo $voteStatus;?>"><br><br>
        <input type="submit" name="submit" value="EDIT"><input type="submit" name="delete" value="DELETE">
    </form>
<?php
}
else
echo "<h3>data tiada dalam database</h3>";

 ?>
</div>
</body>
</html>