<?
$koneksi=mysql_connect("localhost","root","password")or die("gagal konek server".mysql_error());
mysql_select_db("buku",$koneksi)or die("database gagal dibuka".mysql_error());
$txtid=$_POST['txtid'];
$sql="INSERT INTO anggota VALUES ('$txtid',...)";
$cek=mysql_query($sql);
if($cek){
echo"berhasil simpan barang";
include"tampilbarang.php"}
else
echo"data gagal disimpan";
?>
Tidak ada komentar:
Posting Komentar