Skip to content
Snippets Groups Projects
Commit c1d46696 authored by Venny Larasati's avatar Venny Larasati
Browse files

edit link lihat skp on sidebar

parent 1afd039f
Branches
No related merge requests found
Pipeline #1729 skipped
......@@ -96,7 +96,7 @@
</a>
</li>
<li >
<a href="lihat_skp.php">
<a href="controller/form_skp_controller.php?func=2">
<span>Lihat Formulir SKP</span>
</a>
</li>
......
......@@ -8,7 +8,11 @@ $func = $_GET['func'];
if ($func == 1){
$nip = $nip_login;
insertSKP($nip);
}
} else if ($func ==2){
$nip = $nip_login;
getSKP($nip);
}
function insertSKP($nip){
$conn = connect_database();
......@@ -96,7 +100,7 @@ if ($func == 1){
echo "Error: " . $sql . "<br>" . $conn->error;
}
getSKP($nip);
//getSKP($nip);
}
function getSKP($nip){
......@@ -139,6 +143,7 @@ if ($func == 1){
echo "get id skp ".$id_skp."<br>";
$array = array();
// Jika sudah ada, ambil isinya
if ($result->num_rows > 0) {
while($row = $result->fetch_assoc()) {
......@@ -149,6 +154,7 @@ if ($func == 1){
$_SESSION['$target_kuantitas'] = $row["target_kuantitas"];
$_SESSION['$target_biaya'] = $row["target_biaya"];
$_SESSION['$target_waktu'] = $row["target_waktu"];
//$array[] = $row;
}
} else { // Jika belum ada
......@@ -161,6 +167,8 @@ if ($func == 1){
$_SESSION['$target_waktu'] = 0;
}
//$_SESSION['all_kegiatan'] = $array;
header( 'Location: ../lihat_skp.php' ) ;
exit();
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment