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/ | |
|
gan tolong di bantu ya prok2 ini scrip pengirimny... Sep 11th 2013, 12:52, by Petrix Betoufa | gan tolong di bantu ya prok2
ini scrip pengirimnya <?php echo "<td><input type=text size=1 value='".$k['jumlah']."' id=jumlah".$k['nomor']."> <a href=\"javascript:update(".$k['nomor'].")\">Update</a> <span id=\"loading".$k['nomor']."\"></span></td> "?>
terus ini scrip prosesnya
<?php include "koneksi.php"; $id = $_GET['id']; $jml = $_GET['jml']; $harga = mysql_query("select tabelbarang.harga from tabelbarang, tabelpesan where tabelbarang.kode=tabelpesan.idproduk and tabelpesan.nomor=$id"); $h = mysql_fetch_array($harga); $harganya = $h['harga']; $hargabaru = $harganya*$jml; $update = mysql_query("update tabelpesan set jumlah=$jml, harga=$hargabaru where nomor=$id"); if($update){ $ambil = mysql_query("select harga from tabelpesan where nomor=$id"); $a = mysql_fetch_array($ambil); echo $a['harga']; }else{ echo "error"; } ?> |
| | jadi klo q click update ga mau reload otomatis,
tpi proses berjalan lancar, tpi harus reload manual |
| | coba pelajari ajax | | |
|
Tidak ada komentar:
Posting Komentar