<?php
  include "include/dbcon.php";
?>
<?php
  global $conn;
  $arrSec = $_POST["arrSec"];
?>
<?php
  foreach($arrSec as $tid=>$tname){
    $query = "UPDATE punchsys_section SET name='$tname' WHERE id='$tid'";
    mysqli_query($conn,$query);
  }
?>
<?php
  header("location: main.php?pg=sys&ac=sec");
?>