- Beranda
- Komunitas
- Tech
- Programmer Forum
[HELP] Script update " yang salah dimana ya gan"
TS
hendriyulianto
[HELP] Script update " yang salah dimana ya gan"
Gan tolong ang gan kenapa script update ane ketika di eksekusi datanya tidak ke update ya.. Mohon pencerahanya..
pesan_edit.php
pesan_update.php
Mohon pencerahanya gan..
pesan_edit.php
PHP Code:
<?php
include"koneksi.php";
$tampil=mysql_query("select * from pesan where id='$_GET[id]'");
$data=mysql_fetch_array($tampil);
$harga=number_format($data[harga],0,",",".");
?>
<form action="pesan_update.php" method="post" enctype="multipart/form-data">
<table width="90%" border="0">
<tr>
<td width="13%" height="34">Nama Lengkap</td>
<td width="2%"> :</td>
<td width="43%"><input type="text" name="nama" size="40" value="<?=$data['nama']?>" /><input type="text" name="id" value="<?=$data['id']?>" /></td>
<td width="10%">Kode Produk</td>
<td width="2%">:</td>
<td width="30%"><input type="text" name="nama_produk" value="<?=$data['nama_produk']?>" /></td>
</tr>
<tr>
<td height="33">Email</td>
<td> :</td>
<td><input type="email" name="email" size="40" value="<?=$data['email']?>" /></td>
<td>Harga Produk</td>
<td>:</td>
<td><input type="text" name="harga" value="<?=$data['harga']?>" /></td>
</tr>
<tr>
<td height="34">Nomor Handphone</td>
<td> :</td>
<td><input type="text" name="hp" size="40" value="<?=$data['hp']?>" /></td>
<td>Jumlah Beli</td>
<td>:</td>
<td><input type="text" value="1" size="4" /></td>
</tr>
<tr>
<td height="35">Alamat Lengkap </td>
<td> :</td>
<td><input type="text" name="alamat" size="60" value="<?=$data['alamat']?>" /></td>
<td>Jumlah Total</td>
<td>:</td>
<td><? $hari_ini=date('d-m-y');?><input type="hidden" name="tanggal" value="<? echo ($hari_ini);?>" /></td>
</tr>
<tr>
<td height="32">Kategori</td>
<td> :</td>
<td><input type="text" name="produk" size="40" value="<?=$data['produk']?>" /></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td height="32">Status</td>
<td> :</td>
<td><input type="text" value="<?=$data['status']?>" name="status" /></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td height="33">Progres</td>
<td> :</td>
<td><select name="progres">
<option value="P<?=$data['progres']?>"><?=$data['progres']?></option>
<option value="Progres 20 %">Progres 20 %</option>
<option value="Progres 50 %">Progres 50 %</option>
<option value="Progres 70 %">Progres 70 %</option>
<option value="Progres 100 %">Progres 100 %</option>
</select></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td><input type="submit" name="pesan" value="Update" /> <input type="reset" value="Batal Pesan" /></td>
<td></td>
<td></td>
<td></td>
</tr>
</table>
</form>
pesan_update.php
PHP Code:
<?
include"koneksi.php";
{
mysql_query("UPDATE pesan SET nama='$_POST[nama]',
email='$_POST[email]',
hp='$_POST[hp]',
produk='$_POST[produk]',
alamat='$_POST[alamat]',
tanggal='$_POST[tanggal]',
harga='$_POST[harga]',
nama_produk='$_POST[nama_produk]',
status='$_POST[status]',
progres='$_POST[progres]',
WHERE id='$_POST[id]'");
}
header("location<img src="https://s.kaskus.id/images/smilies/sumbangan/6.gif" data-sceditor-emoticon=":p" border="0" alt="emoticon-Stick Out Tongue" title="Stick Out Tongue"/>esan_setting.php");
?>
Mohon pencerahanya gan..
0
871
3
Komentar yang asik ya
Urutan
Terbaru
Terlama
Komentar yang asik ya
Komunitas Pilihan