<?php
session_start();
 include "Connection.php";
?>
<?php

     if(isset($_POST['submit'])){
  
        $Activity    = $_POST['Activity'];
        $SubActivity    = $_POST['SubActivity'];
        //  echo $Process;
        $Time     = $_POST['Time'];
        // echo $Time;
        $project = $_SESSION['proj'];
        //  echo $project;
        //  echo $dbs = $_SESSION['db'];
        // $up = "UPDATE epb_tbl SET Process ='$Process',Time ='$Time' WHERE Project ='$project'";
        $in = "INSERT INTO entry_tbl (Activity,SubActivity,Time,pro) VALUES ('$Activity','$SubActivity','$Time','$project')";
        $up = mysqli_query($con,$in) or die(mysqli_error($con));

        //  echo $up;
        
        //  echo($Query);
        if(!$up){
            echo "<script>alert('Sorry an error occured!')</script>";
            ?>
             <script>
                location.replace("view.php");
          
            </script><?php 
      
        }else{
            echo "<script>alert('record Inserted!')</script>";
            ?>
            <script>
                 location.replace("view.php");
               
            </script><?php
        }
        }
    
    ?> 