You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
670 B
PHP

<?php
session_start();
if($_SESSION['validUser'] !== TRUE)
{
header("location: ./index.php");
exit();
}
?>
<?php
include "./func_lib.php";
$tmpsupp = explode('.',trim($_POST['supp']));
$kdsupp = $tmpsupp[0];
if(bukaKoneksi()){
global $conn;
$query = "SELECT lama_tempo FROM supplier WHERE kd_supplier = ?";
if($stmt = mysqli_prepare($conn,$query)){
mysqli_stmt_bind_param($stmt,"i",$kdsupp);
mysqli_stmt_execute($stmt);
mysqli_stmt_store_result($stmt);
$cek = mysqli_stmt_num_rows($stmt);
if($cek > 0){
mysqli_stmt_bind_result($stmt,$lamaTempo);
while(mysqli_stmt_fetch($stmt)){
echo $lamaTempo;
}
}
}
}
?>