Friday, May 23, 2008

script update

include ("connect.php");
$id_peserta = $HTTP_GET_VARS['id_peserta'];
$tmp_nama = $HTTP_POST_VARS['nama_b'];
$tmp_alamat = $HTTP_POST_VARS['alamat_b'];
$tmp_no_telepon = $HTTP_POST_VARS['no_telepon_b'];

$ubah = OCIParse($conn,"update peserta set nama='$tmp_nama', alamat='$tmp_alamat', no_telepon='$tmp_no_telepon' where id_peserta='$id_peserta'");
$s = ociexecute($ubah);
OCICommit($conn);
if(!$s){
echo "PROSES UBAH DATA GAGAL".var_dump(ocierror());
}else{
echo "PROSES UBAH DATA BERHASIL";
}
header("location:viewpeserta.php");
oci_close($conn);
?>

No comments:

Post a Comment