sirup_segar Posted May 26, 2007 Share Posted May 26, 2007 i try to copy a picture file, using "copy". but when i write "if ($Uplgbr=="none")", i mean "nothing new entered." after it, i update my query into a table. why this erase data on my table? it seems that syntax "if ($Uplgbr=="none")" doesn't match at all. help... Quote Link to comment https://forums.phpfreaks.com/topic/53025-browse-for-picture-and-then-copy-to-server/ Share on other sites More sharing options...
AndyB Posted May 26, 2007 Share Posted May 26, 2007 There is obviously something wrong with your code. Without any code to look at it's impossible to even begin suggesting a solution. Quote Link to comment https://forums.phpfreaks.com/topic/53025-browse-for-picture-and-then-copy-to-server/#findComment-261956 Share on other sites More sharing options...
sirup_segar Posted May 26, 2007 Author Share Posted May 26, 2007 if ($Uplgbr=="none") { echo "idnya : $id <br> penerbitnya : $penerbit<br> temanya : $tema<br> tgl baru : $tgl_br<br> bln baru : $bln_br<br> thn baru : $thn_br<br> gambarnya : $gambar"; $query_updatebook="UPDATE book SET ISBN='$ISBN', penerbit='$penerbit', judul='$judul', pengarang='$pengarang', gambar='$gambar',harga='$harga',genre='2', idjenjang='1',idmpel='1',idtema='$tema' WHERE id='$id' AND ISBN='$ISBN'"; $query_updatedetail="UPDATE detail_bk SET ISBN='$ISBN',stok='0', detail='$detail',tanggal='$tglbantu',hal='$hal', ukuran='$ukuran',Kertas_cover='$kertas_cover', kertas_isi='$kertas_isi',cetak_cover='$cetak_cover', cetak_isi='$cetak_isi' WHERE ISBN='$ISBN'"; $permintaan1=mysql_query("$query_updatebook", $koneksi) or die ("Query Updatebook tidak terupdate ".mysql_error()); $permintaan2=mysql_query("$query_updatedetail", $koneksi) or die ("Query update detail buku tidak terupdate ".mysql_error()); } what i'm trying to ask is , is the code for the first row correct?if nothing is entered in file field? txu Quote Link to comment https://forums.phpfreaks.com/topic/53025-browse-for-picture-and-then-copy-to-server/#findComment-261959 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.