PHP Indonesia - Facebook | PHP Indonesia is a community for everyone that loves PHP. Our focus is in the PHP world but our topics encompass the entire LAMP stack. Topics include PHP coding, to memcached handling, db optimizations, server stack, web server tuning, code deploying, hosting options and much much more. Youtube Channel : http://www.youtube.com/user/OurPHPIndonesia Twitter : @php_indonesia NOTE: Rules for Wall posting: https://www.facebook.com/groups/35688476100/doc/10151597056316101/ Daftar Keanggotaan : http://www.facebook.com/groups/35688476100/doc/10150671770741101/ | |
tanya dunk master script proses hapusku kenapa ya ... Jul 30th 2013, 17:04, by Arista Nagato | tanya dunk master script proses hapusku kenapa ya kok gak bisa jalan kok malah muncul gini kalo di jalankan Data Tidak Ada ,Ulangi lagi
ni scriptnya ....
<?php $index = $_GET['no_induk']; include"koneksi.php"; //susun query $query= "Select * from biodata where no_induk='$index'"; // eksekusi query $hasil=mysql_query($query)or die(mysql_error()); //cek hasil if (mysql_fetch_row($hasil)==0 ) {echo "<script>alert('Data Tidak Ada ,Ulangi Lagi');</script>";} else { //susun query untuk hapus data $query= "Delete from biodata where no_induk='$index'"; // eksekusi query $hasil=mysql_query($query)or die(mysql_error()); if (mysql_affected_rows()>0) {//lain lain echo "<script>alert('Penghapusan Berhasil');</script>";} else {echo"Penghapusan Gagal, Coba Lagi";} echo "<p><a href='carisiswa.php'>kembali</a>";} ?> </body> </html> |
| | kemungkinan $_GET['no_induk'] g terkirim tu gan.... |
| | jadi gmn gan bingung aku |
| | lw q biasax pkek gni gan.. |
| | lw q biasax pkek gni gan.. <a href='aksi.php?module=xxx&act=hapus&id=$r[no_induk]'>del</a> jadi tingal $_get[id] aj di script aksi hapusx.... |
| | mysql_fetch_row ganti aja jd mysql_num_rows |
| | sepertinya salah dipenangkapan variable udah yakin url?no_induk=id ?? | | |
|
Tidak ada komentar:
Posting Komentar