本文整理汇总了PHP中koneksi_db函数的典型用法代码示例。如果您正苦于以下问题:PHP koneksi_db函数的具体用法?PHP koneksi_db怎么用?PHP koneksi_db使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了koneksi_db函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: koneksi_db
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php
include "lib_func.php";
$link = koneksi_db();
?>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>SKUMPTK</title>
<!-- Bootstrap -->
<link href="../bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="../css/css.css">
</head>
<body>
<div class="container header">
<div class="page-header">
<?php
header_web();
?>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-lg-3">
<div class="menu text-center">
<?php
menu();
?>
</div>
示例2: session_start
<?php
session_start();
if (!isset($_SESSION['stat'])) {
?>
<script type="text/javascript">
alert("Maaf Harus Login Terlebih Dahulu");
document.location='../../index.php';</script>
<?php
}
include_once "../../lib_function.php";
koneksi_db();
include_once "desain_ortu.php";
$id_ortu = $_SESSION['id_ortu'];
$sesi = $_SESSION['nama_ortu'];
$nis = $_SESSION['nis'];
if ($_SESSION["stats"] != "ortu") {
?>
<script type="text/javascript">
alert("Maaf Halaman Ini Hanya Untuk Orang Tua Siswa");
document.location='../../index.php';</script>
<?php
} else {
?>
<!DOCTYPE html>
<html lang="en">
<head>
<?php
$sql_mp = "SELECT * FROM mp JOIN nilai USING (id_mp) JOIN kelas USING (id_kelas) JOIN siswa USING (nis) WHERE siswa.id_kelas=kelas.id_kelas GROUP BY nilai.id_mp ORDER BY nilai.id_nilai DESC";
$result_mp = mysql_query($sql_mp);
$jmldata_mp = mysql_num_rows($result_mp);
示例3: move_uploaded_file
<?php
// code A
include "fungsi_koneksi.php";
// end of code A
// code B
$lokasi_file = $_FILES['adiputra']['tmp_name'];
$tipe_file = $_FILES['adiputra']['type'];
$nama_file = $_FILES['adiputra']['name'];
$direktori = "image/{$nama_file}";
// end of code B
if (!empty($lokasi_file)) {
move_uploaded_file($lokasi_file, $direktori);
// code C
$koneksi = koneksi_db();
$sql = "insert into artikel values (null,'{$nama_file}')";
$aksi = mysql_query($sql, $koneksi);
// end of code C
// code D
if (!$aksi) {
echo "maaf gagal memasukan gambar";
} else {
echo "gambar berhasil di upload<br>";
echo "untuk melihatnya silakan klik <a href='view_image.php'>Link ini</a>";
}
// end of code D
} else {
echo "terjadi kesalahan";
}