download subtitle indonesia
AnggaraSatu
RPL
satuanggara.blogspot.co.id
Saturday, February 27, 2016
tutorial HTML/CSS dropdown menu DW8
download subtitle indonesia
Friday, February 26, 2016
berikut ini adalah script untuk mempersingkat coding anda di php scrip maupun di css scrip, jadi anda tidak usah bingung memasukan terlalu banyak coding di scrip anda, atau terjadi suatu hal hal yang tidak diingingkan, baiklah tidak usah banyak bicara ini dia script nya :
<?php
if (isset($_GET['page'])){
$page=$_GET['page'];
$file="$page.php";
if (!file_exists($file)){
include("dashboard.php");
}else{
include("$page.php");
}
}else{
include("dashboard.php");
}
?>
itu tadi adalah scrip nya, tapi ingat setelah anda menyimpan script itu dan memberi nama content.php, anda membuat baru dengan isian hanya selamat datang di body nya, dan anda beri nama dashboard.php, jadi anda bisa mendapatkan 2 halaman sekaligus dengan 1 script saja, sekian dari saya, apabila ada permohonan scrip tinggal comment saja di blog saya
<?php
if (isset($_GET['page'])){
$page=$_GET['page'];
$file="$page.php";
if (!file_exists($file)){
include("dashboard.php");
}else{
include("$page.php");
}
}else{
include("dashboard.php");
}
?>
itu tadi adalah scrip nya, tapi ingat setelah anda menyimpan script itu dan memberi nama content.php, anda membuat baru dengan isian hanya selamat datang di body nya, dan anda beri nama dashboard.php, jadi anda bisa mendapatkan 2 halaman sekaligus dengan 1 script saja, sekian dari saya, apabila ada permohonan scrip tinggal comment saja di blog saya
Friday, January 29, 2016
script untuk cek login
## setelah membuat script login, maka cek dulu username dan password anda dengan membuat script cek login, ini script nya :)
<?php
include "../anggara/konek.php";
$pass=md5 ($_POST['password']);
$login=mysql_query("select * from tlogin where username='$_POST[username]' and password='$pass'");
$ketemu=mysql_num_rows($login);
$r=mysql_fetch_array($login);
//apabila username dan password ditemukan (valid)
if($ketemu>0){
session_start(); //untuk memulai session
//daftarkan session ke server
session_register("namauser");
session_register("passuser");
//isi dari variable session
$_SESSION[namauser]=$r[id_user];
$_SESSION[passuser]=$r[password];
header('location:.php'); //buka hal input berita
}
else {
echo("login gagal ! username dan password tidak benaar<br>");
echo("<a href=login.php>ulangi lagi</a>");
}
?>
<?php
include "../anggara/konek.php";
$pass=md5 ($_POST['password']);
$login=mysql_query("select * from tlogin where username='$_POST[username]' and password='$pass'");
$ketemu=mysql_num_rows($login);
$r=mysql_fetch_array($login);
//apabila username dan password ditemukan (valid)
if($ketemu>0){
session_start(); //untuk memulai session
//daftarkan session ke server
session_register("namauser");
session_register("passuser");
//isi dari variable session
$_SESSION[namauser]=$r[id_user];
$_SESSION[passuser]=$r[password];
header('location:.php'); //buka hal input berita
}
else {
echo("login gagal ! username dan password tidak benaar<br>");
echo("<a href=login.php>ulangi lagi</a>");
}
?>
contoh membuat scrip login
<? php
echo "<h2> masuk </ h2>
<form method = pasca aksi = cek_login.php>
<table>
<tr>
<td> nama </ td>
<td>: <input type = nama text = username> </ td>
</ tr>
<tr>
<td> sandi </ td>
<td>: <input type = nama password = password> </ td>
</ tr>
<tr>
<td colpasn = 2> <input type = submit value = masuk> </ td>
</ tr>
</ table>
</ form> ";
?>
#sebelum membuat scrip, buat dulu tabel anda di phpmyadmin, :)
echo "<h2> masuk </ h2>
<form method = pasca aksi = cek_login.php>
<table>
<tr>
<td> nama </ td>
<td>: <input type = nama text = username> </ td>
</ tr>
<tr>
<td> sandi </ td>
<td>: <input type = nama password = password> </ td>
</ tr>
<tr>
<td colpasn = 2> <input type = submit value = masuk> </ td>
</ tr>
</ table>
</ form> ";
?>
#sebelum membuat scrip, buat dulu tabel anda di phpmyadmin, :)
Monday, December 21, 2015
langkah membuat halaman view pada php
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
<h2>buku</h2>
<a href="form.php" target="contain" class="tombol" style="float:left;">daftar buku</a>
<a href="buku.php" target="contain" class="tombol" style="float:left;">tambah buku</a>
<a href="jumlah_buku.php" target="contain" class="tombol" style="float:left;">tambah jumlah buku</a>
<a href="kategori.php" target="contain" class="tombol" style="float:left;">kategori</a>
<a href="penerbit.php" target="contain" class="tombol" style="float:left;">penerbit</a>
<a href="pengarang.php" target="contain" class="tombol" style="float:left;">penerbit</a>
<h2> </h2>
<h2> </h2>
<h2>daftar buku</h2>
<table width="80%" border="0">
<?php
include "konek.php";
$r=mysql_query("select *from tbuku order by judul");
$i=1;
while($a=mysql_fetch_array($r)) {
?>
<tr>
<td width="23"><?php echo $i;?></td>
<td width="236"><?php echo $jud=$a['judul'];?></td>
<td width="23"><a href="detil_buku.php?id=<?php echo $a['id'];?>" class="link" target="contain">detil</a></td>
<td width="23"><a href="ubah_buku.php?id=<?php echo $a['id'];?>" class="link">ubah</a></td>
<td width="23"><a href="hapus.php?id=<?php echo $a['id'];?>" onclick="return confirm('apa anda yakin?')" class="link">hapus</a></td>
</tr>
<?php $i++;
}
?>
</table>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
<h2>buku</h2>
<a href="form.php" target="contain" class="tombol" style="float:left;">daftar buku</a>
<a href="buku.php" target="contain" class="tombol" style="float:left;">tambah buku</a>
<a href="jumlah_buku.php" target="contain" class="tombol" style="float:left;">tambah jumlah buku</a>
<a href="kategori.php" target="contain" class="tombol" style="float:left;">kategori</a>
<a href="penerbit.php" target="contain" class="tombol" style="float:left;">penerbit</a>
<a href="pengarang.php" target="contain" class="tombol" style="float:left;">penerbit</a>
<h2> </h2>
<h2> </h2>
<h2>daftar buku</h2>
<table width="80%" border="0">
<?php
include "konek.php";
$r=mysql_query("select *from tbuku order by judul");
$i=1;
while($a=mysql_fetch_array($r)) {
?>
<tr>
<td width="23"><?php echo $i;?></td>
<td width="236"><?php echo $jud=$a['judul'];?></td>
<td width="23"><a href="detil_buku.php?id=<?php echo $a['id'];?>" class="link" target="contain">detil</a></td>
<td width="23"><a href="ubah_buku.php?id=<?php echo $a['id'];?>" class="link">ubah</a></td>
<td width="23"><a href="hapus.php?id=<?php echo $a['id'];?>" onclick="return confirm('apa anda yakin?')" class="link">hapus</a></td>
</tr>
<?php $i++;
}
?>
</table>
</body>
</html>
langkah membuat script update pada php
<?php
include "konek.php";
$judul=$_POST['judul'];
$cover=(rand()%99999);
$kategori=$_POST['kategori'];
$penerbit=$_POST['penerbit'];
$pengarang=$_POST['pengarang'];
$sinopsis=$_POST['sinopsis'];
$lokasi=$_POST['lokasi'];
$harga=$_POST['harga'];
$id=$_POST['id'];
mysql_query("update buku set judul='$judul',cover='$cover.jpg',kategori='$kategori',penerbit='$penerbit',pengarang='$pengarang',sinopsis='$sinopsis',lokasi='$lokasi',harga='$harga' where id='$id'");
$f=$_FILES['cover'];
$na=$f['name'];
if (!empty ($na)) {
mysql_query("update buku set cover='$cover.jpg' where id='$id'");
move_uploaded_file($_FILES['cover']['tmp_name'],"cover/$cover.jpg");
}
header("location:view.php");
?>
include "konek.php";
$judul=$_POST['judul'];
$cover=(rand()%99999);
$kategori=$_POST['kategori'];
$penerbit=$_POST['penerbit'];
$pengarang=$_POST['pengarang'];
$sinopsis=$_POST['sinopsis'];
$lokasi=$_POST['lokasi'];
$harga=$_POST['harga'];
$id=$_POST['id'];
mysql_query("update buku set judul='$judul',cover='$cover.jpg',kategori='$kategori',penerbit='$penerbit',pengarang='$pengarang',sinopsis='$sinopsis',lokasi='$lokasi',harga='$harga' where id='$id'");
$f=$_FILES['cover'];
$na=$f['name'];
if (!empty ($na)) {
mysql_query("update buku set cover='$cover.jpg' where id='$id'");
move_uploaded_file($_FILES['cover']['tmp_name'],"cover/$cover.jpg");
}
header("location:view.php");
?>
langkah membuat halaman ubah pada php
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
<div class="batas">
<h2>ubah buku</h2>
<?php
include"konek.php";
$id=$_GET['id'];
$r=mysql_query("select *from tbuku where id='$id'");
$a=mysql_fetch_array($r);
?>
<form action="update_buku.php" method="post" enctype="multipart/form-data" name="form1" id="form1">
<table width="70%" border="1">
<tr>
<td width="22%">judul</td>
<td width="78%"><label>
<input name="judul" value="<?php echo $a['judul'];?>" required="required" type="text" class="text" id="judul" />
</label></td>
</tr>
<tr>
<td>cover</td>
<td><img src="cover/<?php echo $a['cover'];?>" width="50" style="float:left;margin-right:5px;"? /><label>
<input name="cover" type="file" class="text" id="cover" /> <br />pilih untuk mengcover buku</label></td>
</tr>
<tr>
<td>kategori</td>
<td><label>
<select name="kategori" required="required" class="text" id="kategori">
<option select="selected" value="<?php echo $a['kategori'];?>">-kategori-</option>
<?php
$rr=mysql_query("select *from kategori order by kat");
while($ar=mysql_fetch_array($rr)) {
?>
<option value="<?php echo $ar['kat'];?>"><?php echo $ar['kat'];?></option>
<?php }?>
</select>
</label></td>
</tr>
<tr>
<td>penerbit</td>
<td><label>
<select name="penerbit" required="required" class="text" id="penerbit">
<option select="selected" value="<?php echo $a['penerbit'];?>">-penerbit-</option>
<?php
$rr=mysql_query("select *from penerbit order by kat");
while($ar=mysql_fetch_array($rr)) {
?>
<option value="<?php echo $ar['kat'];?>"><?php echo $ar['kat'];?></option>
<?php }?>
</select>
</label></td>
</tr>
<tr>
<td>pengarang</td>
<td><label>
<select name="pengarang" required="required" class="text" id="pengarang">
<option select="selected" value="<?php echo $a['pengarang'];?>">-pengarang-</option>
<?php
$rr=mysql_query("select *from pengarang order by kat");
while($ar=mysql_fetch_array($rr)) {
?>
<option value="<?php echo $ar['kat'];?>"><?php echo $ar['kat'];?></option>
<?php }?>
</select>
</label></td>
</tr>
<tr>
<td>sinopsis</td>
<td><label>
<textarea name="sinopsis" required="required" cols="45" rows="5" class="textarea" id="sinopsis"><?php echo $a['sinopsis'];?></textarea>
</label></td>
</tr>
<tr>
<td>lokasi</td>
<td><label>
<input name="lokasi" required="required" value="<?php echo $a['lokaasi'];?>" type="text" class="text" id="lokasi" />
</label></td>
</tr>
<tr>
<td>harga</td>
<td><label>
<input name="harga" required="required" value="<?php echo $a['harga'];?>" type="text" class="text" id="harga" />
</label></td>
</tr>
<tr>
<td><input name="id" type="hidden" id="id" value="<?php echo $id;?>" /></td>
<td><label>
<input name="button" type="submit" class="tombol" id="button" value="ubah" />
</label>
</td>
</tr>
</table>
</form>
</div>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
<div class="batas">
<h2>ubah buku</h2>
<?php
include"konek.php";
$id=$_GET['id'];
$r=mysql_query("select *from tbuku where id='$id'");
$a=mysql_fetch_array($r);
?>
<form action="update_buku.php" method="post" enctype="multipart/form-data" name="form1" id="form1">
<table width="70%" border="1">
<tr>
<td width="22%">judul</td>
<td width="78%"><label>
<input name="judul" value="<?php echo $a['judul'];?>" required="required" type="text" class="text" id="judul" />
</label></td>
</tr>
<tr>
<td>cover</td>
<td><img src="cover/<?php echo $a['cover'];?>" width="50" style="float:left;margin-right:5px;"? /><label>
<input name="cover" type="file" class="text" id="cover" /> <br />pilih untuk mengcover buku</label></td>
</tr>
<tr>
<td>kategori</td>
<td><label>
<select name="kategori" required="required" class="text" id="kategori">
<option select="selected" value="<?php echo $a['kategori'];?>">-kategori-</option>
<?php
$rr=mysql_query("select *from kategori order by kat");
while($ar=mysql_fetch_array($rr)) {
?>
<option value="<?php echo $ar['kat'];?>"><?php echo $ar['kat'];?></option>
<?php }?>
</select>
</label></td>
</tr>
<tr>
<td>penerbit</td>
<td><label>
<select name="penerbit" required="required" class="text" id="penerbit">
<option select="selected" value="<?php echo $a['penerbit'];?>">-penerbit-</option>
<?php
$rr=mysql_query("select *from penerbit order by kat");
while($ar=mysql_fetch_array($rr)) {
?>
<option value="<?php echo $ar['kat'];?>"><?php echo $ar['kat'];?></option>
<?php }?>
</select>
</label></td>
</tr>
<tr>
<td>pengarang</td>
<td><label>
<select name="pengarang" required="required" class="text" id="pengarang">
<option select="selected" value="<?php echo $a['pengarang'];?>">-pengarang-</option>
<?php
$rr=mysql_query("select *from pengarang order by kat");
while($ar=mysql_fetch_array($rr)) {
?>
<option value="<?php echo $ar['kat'];?>"><?php echo $ar['kat'];?></option>
<?php }?>
</select>
</label></td>
</tr>
<tr>
<td>sinopsis</td>
<td><label>
<textarea name="sinopsis" required="required" cols="45" rows="5" class="textarea" id="sinopsis"><?php echo $a['sinopsis'];?></textarea>
</label></td>
</tr>
<tr>
<td>lokasi</td>
<td><label>
<input name="lokasi" required="required" value="<?php echo $a['lokaasi'];?>" type="text" class="text" id="lokasi" />
</label></td>
</tr>
<tr>
<td>harga</td>
<td><label>
<input name="harga" required="required" value="<?php echo $a['harga'];?>" type="text" class="text" id="harga" />
</label></td>
</tr>
<tr>
<td><input name="id" type="hidden" id="id" value="<?php echo $id;?>" /></td>
<td><label>
<input name="button" type="submit" class="tombol" id="button" value="ubah" />
</label>
</td>
</tr>
</table>
</form>
</div>
</body>
</html>
Subscribe to:
Comments (Atom)
![”download[4]”](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVQmFIYjcpUw038qmWk7ALTXGZLzY-wR0_IW9ela17sd-lVhLcaeILHgiWokMOX2LBtE8hb2uAK4dQJH2nkcI3-rw4piAXkqpLIermEQ5mU6kCktQZjwFX-1DNieC0JfXnj3UieZZG9zdv/s1600/download+oke+2.jpg%E2%80%9D)