-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathedit-proses.php
28 lines (27 loc) · 1.01 KB
/
edit-proses.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<!DOCTYPE html>
<html>
<body>
<?php
include 'koneksi.php';
$no_invoice = $_POST['invoice'];
$pengirim = $_POST['pengirim'];
$alm_pengirim = $_POST['alm_pengirim'];
$penerima = $_POST['penerima'];
$alm_penerima = $_POST['alm_penerima'];
$kapal = $_POST['kapal'];
$deskripsi = $_POST['deskripsi'];
$jumlah = $_POST['jumlah'];
$satuan = $_POST['satuan'];
$harga = $_POST['harga'];
if ($jumlah<1) {
$total =$harga;
} else {
$total = $jumlah * $harga;
}
if (isset($_POST['submit'])) {
$query = mysql_query("INSERT INTO `transaksi` VALUES ('$no_invoice',(SELECT CURRENT_DATE()),'$pengirim','$alm_pengirim','$penerima','$alm_penerima','$kapal','$deskripsi','$jumlah','$satuan','$harga','$total')");
header("Location: edit.php?ulang=0");
}
?>
</body>
</html>