<?php

mysql_connect('localhost', 'ouzensys_webus', 'Poiuy12345678') or die("Koneksi gagal");
mysql_select_db('ouzensys_web') or die("Database tidak bisa dibuka");
$id = $_POST['id'];
$value = $_POST['value'];
if($id > 0){
    if($value == 'Y' || $value == 'YA' ){
		$Q = "UPDATE jualcs set fol5='N' where billno=$id";
	}
	elseif($value == 'N' || $value == 'NO' ){
		$Q = "UPDATE jualcs set fol5='Y' where billno=$id";
	}
    if(mysql_query($Q)){
        if($value == 'Y' || $value == 'YA'){
            echo "N";
        }elseif($value == 'N' || $value == 'NO' ){
            echo "Y";
        }
    }else{
        echo 'Z';
    }
}else{
    echo 'Z';
}
?>