function tambahProduct() { global $s, $inp, $par, $cUsername; $fileProduk = uploadProduct($par[kodeSupplier], $inp[kodeProduk], $inp[kodeKategori]); repField(); $sql = "insert into dta_supplier_produk (kodeSupplier, kodeProduk, kodeKategori, keteranganProduk, hargaProduk, fileProduk, createBy, createTime) values ('{$par['kodeSupplier']}', '{$inp['kodeProduk']}', '{$inp['kodeKategori']}', '{$inp['keteranganProduk']}', '" . setAngka($inp[hargaProduk]) . "', '{$fileProduk}', '{$cUsername}', '" . date('Y-m-d H:i:s') . "')"; db($sql); echo "<script>window.parent.location='index.php?par[mode]=edit&tab=2" . getPar($par, "mode,kodeProduk,kodeKategori") . "';</script>"; }
<!DOCTYPE html> <?php require_once '../model/connect.php'; require_once 'up.php'; if (isset($_POST['product_id']) && !empty($_POST['product_id'])) { uploadProduct(); // header("Refresh:0"); } ?> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="description" content=""> <meta name="author" content=""> <title>Contact - Business Casual - Start Bootstrap Theme</title> <!-- Bootstrap Core CSS --> <link href="css/bootstrap.min.css" rel="stylesheet"> <!-- Custom CSS --> <link href="css/business-casual.css" rel="stylesheet"> <!-- Fonts -->