$time_start = microtime(true);
//usleep(100);
$time_end = microtime(true);
$time = $time_end - $time_start;
echo "Did nothing in $time seconds\n";
?>
Implementasi pada code Simpan:
if(isset($_GET["pro"]) && $_GET["pro"]=="save"){
$tanggal=date("Y-m-d");
$nama_pengujian=$_SESSION["cid"]."-".date("Y-m-d H:i:s");
$catatan=$_SESSION["cket"];
$rekapitulasi=$_SESSION["chasil"];
$durasi=$_SESSION["cdurasi"];
$_SESSION["chitung"]="";
unset($_SESSION["chitung"]);
$_SESSION["cdurasi"]="";
unset($_SESSION["cdurasi"]);
$tanggal=date("Y-m-d");
$jam=date("H:i:s");
$sql=" INSERT INTO `$tbhasil` (
`id_hasil` ,`nama_pengujian` ,
`tanggal` ,`jam` ,`keterangan` ,`durasi` ,
`rekapitulasi`
) VALUES (
'', '$nama_pengujian',
'$tanggal','$jam', '$catatan', '$durasi',
'$rekapitulasi'
)";
$simpan=process($conn,$sql);
if($simpan) {echo "<script>alert('Data $id_hasil berhasil disimpan !');document.location.href='?mnu=hasil';</script>";}
else{echo"<script>alert('Data $id_hasil gagal disimpan...');document.location.href='?mnu=hasil';</script>";}
}
Tidak ada komentar:
Posting Komentar