hii ... Aug 5th 2013, 23:51, by Reinkarnasi Tough Sailor | <html> <head> <tittle>hii</tittle> </head> <body> <?php $koneksi=mysql_connect("localhost","root","") or die ("Gagal konek".mysql_error()); if ($koneksi) { mysql_select_db("latihandb",$koneksi) or die ("database gagal dibuka".mysql_error()); $ID=$_GET['ID']; $sql="DELETE FROM anggota Where id_anggota='$ID'"; $qry=mysql_query($sql,$koneksi) or die ("query gagal".mysql_error()); if ($qry){ echo "data berhasil dihapus"; include "hapustampil.php"; } else echo "gagal menghapus"; exit; } ?> </body> </html> master2 ane lagi belajar mysql dan php,,, ane lagi buat hapusdata.php hasilnya kok malah seperti ini,,, mohon petunjuknya donk master2 |
| | php lama tuh,, |
| | Coba ganti kode ini : if ($qry){ echo "data berhasil dihapus"; include "hapustampil.php"; } else echo "gagal menghapus"; exit; } Ubah kode diatas jadi : if ($qry){ echo "data berhasil dihapus"; include "hapustampil.php"; } else { echo "gagal menghapus"; exit; } |
| | blm bisa juga gan |
| | <html> <head> <tittle>hii</tittle> </head> <body> <?php $koneksi=mysql_connect("localhost","root","") or die ("Gagal konek".mysql_error()); if ($koneksi) { mysql_select_db("latihandb",$koneksi) or die ("database gagal dibuka".mysql_error()); $ID=$_GET['ID']; $sql="DELETE FROM anggota Where id_anggota='$ID'"; $qry=mysql_query($sql,$koneksi) or die ("query gagal".mysql_error()); if ($qry){ echo "data berhasil dihapus"; include "hapustampil.php"; } else {echo "gagal menghapus"; exit;} } ?> </body> </html> |
| | liat tabelnya om |
| | <?php $koneksi=mysql_connect("localhost","root","") mysql_select_db("latihandb"); $id=$_GET['id']; $qry=mysql_query("DELETE FROM anggota WHERE id_anggota='$id'"); ?> | |
Tidak ada komentar:
Posting Komentar