skip to main
|
skip to sidebar
Conscience me
BINUS HACKER
Baxuryu DIenz Azzalah
menyukai
BINUSHACKER
Buat Lencana Suka Anda
Buka Semua
|
Tutup Semua
Mengenai Saya
Unknown
View my complete profile
Arsip Blog
Cara Membuat Menu Horizontal
Cara Membuat Search Engine
daftar posting
Modul E-Cmers
Modul EPTIKOM
Latihan Wep Programing II
Keamanan Jarkom
Latihan Linux Centos
Latihan Web PHP
Koleksi Serial number
Hadirnya linux ubuntu
Materi Visual basic
Membangun distro linux
10 Alasan menggunakan linux
Modul Intermac
10 Alasan menggunakan linux
Modul Sistem informasi manajemen
Angka Index
Modul d3 BSI
Open Source
trik bermain registry
<<
View shoutbox
ShoutMix chat widget
>>
[tutup]
Arsip Blog
▼
2012
(10)
►
June
(2)
►
May
(2)
►
April
(1)
▼
January
(5)
Desain basis Data
KEAMANAN JARINGAN KOMPUTER
Latihan Linux centos
DATA FAKTUR
Latihan Web PHP 1
►
2011
(8)
►
November
(3)
►
June
(1)
►
May
(1)
►
April
(2)
►
January
(1)
►
2010
(19)
►
December
(4)
►
November
(8)
►
August
(1)
►
July
(1)
►
April
(5)
►
2009
(1)
►
October
(1)
Feedjit Live Blog Stats
Pengikut
Link
Opank
javascripttreemenu
Linux
Home
Profile
Facebook
Belajar PHP, cara membuat website, HTML, MySQL, VB, Komputer dan Bahasa
DATA FAKTUR
DATA FAKTUR
INPUT.PHP
<!doctype html public "-//W3C//DTD HTML 4.0 //EN">
<html>
<head>
<title>Title here!</title>
</head>
<body bgcolor=yellow>
<form action=output2.php method="post">
<?
echo"<br>TGL :" .date('l d-M-Y');
echo"<br> Jam :" .date('g:i:s A');
?>
<font face="Lucida Calligraphy" Size=4 color=#FFFFFF>
<p> Selamat DatanG </p>
<table border=4 bgcolor=balck cellspasing=5 cellpadding=25 align=center>
<pre>
<form action=output2.php method="post">
<tr><td colspan="6"><strong><div align="center">Data Faktur</strong></div></tr></td>
<tr>
<td>
No Faktur :<td><input type="text" name="nofak"></tr></td>
<tr>
<td>
Tgl. Faktur :<td><input type="text" name="tglfaktur"></tr></td>
<tr>
<td>
Nama Barang :<td><Select size=1 name="nabar">
<option value="kulkas">Kulkas</option>
<option value="radio">Radio</option>
<option value="lampu">Lampu</option></select></tr></td>
<tr>
<td>
Jumlah <td><input type="text" name="qty"></tr></td>
<tr>
<td>
Jenis Bayar <td><input type="radio" value="cash" name="jbayar"> Cash <br>
<input type="radio" value="kredit" name="jbayar"> Kredit</tr></td>
<tr><td colspan="6">
<div align="center"><input type="submit" value="Masukan Data"> <input type="reset" value="Hapus Data">
</div>
</pre>
</td>
</tr>
</body>
</html>
OUTPUT.PHP
<!doctype html public "-//W3C//DTD HTML 4.0 //EN">
<html>
<head>
<title>Title here!</title>
</head>
<body>
<?
$konek=mysql_connect("localhost","root","password")
or die ("koneksi gagal".mysql_error());
echo"Koneksi Berhasil<br>";
$sql="insert into faktur(nofak,tglfaktur,nabar,qty,jbayar)
values('$nofak','$tglfaktur','$nabar','$qty','$jbayar')";
$qry=mysql_db_query("12099939",$sql,$konek);
if($qry){
print"berhasil disimpan<br>";
}
else{
print"gak masuk<br>";
}
echo"<h3><center>Daftar Transaksi</center></h3>";
$sql="select*from faktur";
$qry=mysql_db_query("12099939",$sql,$konek)or die("gagal tampil".mysql_error());
echo"<pre>
<table border='4' align='center'>
<tr><td>No.faktur<td>tgl.Faktur<td>Nama Barang<td>Harga<td>Quality<td>Subtotal<td>Cara Bayar<td>Aksi";
while($row=mysql_fetch_row($qry))
{if($row[2]=="radio"){$harga=50000;}
if($row[2]=="lampu"){$harga=20000;}
if($row[2]=="kulkas"){$harga=800000;}
$subt=$harga*$row[3];
echo"<tr><td>$row[0]<td>$row[1]<td>$row[2]<td>$row[3]<td>$row[4]
<td><a href='hapus.php?nofak=$row[0]'>Hapus</a>";
echo"<br>";
}
echo"</table></pre>";
print"<a href='output1.php'>Masukan Data Lagi</a>";
?>
</body>
</html>
HAPUS.PHP
<!doctype html public "-//W3C//DTD HTML 4.0 //EN">
<html>
<head>
<title>Title here!</title>
</head>
<body>
<?
$konek=mysql_connect("localhost","root","password")
or die ("koneksi hapus gagal".mysql_error());
$sql="DELETET FROM faktur WHERE nofak='$nofak'";
$qry=mysql_db_query("masukan nama database",$sql,$konek)
or die ("query salahh".mysql_error());
if($qry)(
echo"Data Berhasil Di Hapus";
echo"<a href=output.php>kembali ke tampil</a>
}
else
echo"GAGAL MENGHAPUS";
exit;?>
</body>
</html>
Data Faktur
No Faktur :
Tgl. Faktur :
Nama Barang :
Kulkas
Radio
Lampu
Jumlah
Jenis Bayar
Cash
Kredit
Best Regard,
0 comments:
Post a Comment
No Coment No Spam!!!
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment
No Coment No Spam!!!