Wednesday, June 11, 2008

PHP-script update

<?
$conn = mysql_connect("localhost","root","");
mysql_select_db("basdat",$conn);
$tmp_id_pesanan = $HTTP_GET_VARS['id_pesanan'];
$tmp_id_pemesan = $HTTP_POST_VARS['id_pemesan'];
$tmp_id_pegawai = $HTTP_GET_VARS['id_pegawai'];
$tmp_tgl_pesan = $HTTP_POST_VARS['tgl_pesan'];
$tmp_lama = $HTTP_POST_VARS['lama'];
$tmp_id_kamar = $HTTP_POST_VARS['id_kamar'];
$tmp_id_meeting = $HTTP_POST_VARS['id_meeting'];
$sql = "update pesanan set id_pemesan='$tmp_id_pemesan' , tgl_pesan='$tmp_tgl_pesan', lama='$tmp_lama' where id_pesanan='$tmp_id_pesanan'";

mysql_query($sql);
header("location:viewpesanan.php");
mysql_close($conn);
?>

No comments:

Post a Comment