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/ | |
 | Geek Squad from Best Buy
Get instant online support. We can fix computers, cameras, car technology and more. Talk to us today.  | From our sponsors | | |
bingung saya kenapa ini kode gagal terus melakukan... Sep 27th 2013, 04:01, by Ardian Saputra | bingung saya kenapa ini kode gagal terus melakukan update padhal di program lainya work sedangkan di progam yang satu ini ko ga work kenapa ya? mohn bantuanya master
<?php include("../config.php"); $id_kat =$_GET['id_kat']; $query ="select * from kategori where id_kat='$id_kat'"; $result =mysql_query($query) or die("gagal melakukan query");
$buff = mysql_fetch_array($result); mysql_close(); ?> <?php include("../config.php"); if (isset($_POST['update'])) {
$kategori= $_POST['kategori']; $id_kat = $_POST['id_kat']; $query = mysql_query("update kategori set kategori='$kategori' where id_kat='$id_kat'"); if ($query){ echo"<script>alert('Data Berhasil Diupdate ') location.replace('?page=tampil_kategori')</script>"; } else echo "<script>alert('Data Gagal Diupdate ') location.replace('?page=tampil_kategori')</script>"; } ?> <html> <head> <style type="text/css"> <!-- .style1 { color: #FFFFFF; font-weight: bold; } .style2 {color: #000000}
input{border-radius:3px; font-size:15px;
height:28px; } textarea{border-radius:3px;} input:focus{ outline: none; -moz-box-shadow:0px 0px 5px #20f; -webkit-box-shadow:0px 0px 5px #20f; box-shadow:0px 0px 5px #20f;
} textarea:focus{ outline: none; -moz-box-shadow:0px 0px 5px #20f; -webkit-box-shadow:0px 0px 5px #20f; box-shadow:0px 0px 5px #20f; border-radius:2px; }
--> </style> </head> <body> <FORM ACTION="" METHOD="POST" NAME="input"> <table width="330" border="0" align="center" cellpadding="1" cellspacing="1" bordercolor="#000000" bgcolor="#FFFFFF"> <tr valign="" bgcolor="#CCCCCC"> <td colspan="2"><div align="center" class="style1 style2"> <p>Update Kategori </p> </div></td> </tr> <tr> <td width="88" height="28"><strong>kategori</strong></td> <td width="251"> <input type="text" name="kategori" size="30"value="<?php echo $buff['kategori']; ?>"></td> </tr> <input type="hidden" name="id_kat" value="<? echo $id_kat; ?>"/> <tr> <td> </td> <td> </td> </tr> <tr> <td> </td> <td><input type="submit" name="update" value="Update"></td> </tr> </table> </FORM> </div> </body> </html> |
| | Ngopi dulu ce. . wkwkwz | | |
|
Tidak ada komentar:
Posting Komentar