<?php
include('../../../function/__data_app_db.php');
$review_id = validate_jsnj_data($_POST['review']);
$result = mysqli_query($_conn_db,"select * from review where review_id='$review_id'");
               while($data = mysqli_fetch_array($result)){
			     $result_show = validate_jsnj_data($data['action']);
			   };
if($result_show==1){
$result_show_hide = '2';
} else if($result_show==2){
$result_show_hide = '1';
};
$currentTime = date('Y-m-d H:i:s');


$sql = "update  review set action ='$result_show_hide' where review_id='$review_id'";
$retval = mysqli_query( $_conn_db,$sql );
if(! $retval ){
	echo '2';
}else {
	echo '1';
}?>



