<?php
include('connection.php');
//echo '656';
   
   $srno=$_GET['srno'];
  // echo $srno;


$SQL1="select * from `success_stories` where `Sr_No`='$srno'"; 
//echo $SQL1;
$res=mysqli_query($GLOBALS["___mysqli_ston"], $SQL1) or die ("Error Message5" . mysqli_error($GLOBALS["___mysqli_ston"]));
	while($rw2 = mysqli_fetch_assoc($res))
{
	$status=$rw2['Status'];
	}   
if($status=='disable')
{
	
$SQL1="update `success_stories` set  `Status`='visible' where `Sr_No`='$srno'"; 
//echo $SQL1;
mysqli_query($GLOBALS["___mysqli_ston"], $SQL1) or die ("Error Message5" . mysqli_error($GLOBALS["___mysqli_ston"]));	
//echo "Updated Successfully";
	}
	else {
  	
$SQL1="update `success_stories` set  `Status`='disable' where `Sr_No`='$srno'"; 
//echo $SQL1;
mysqli_query($GLOBALS["___mysqli_ston"], $SQL1) or die ("Error Message5" . mysqli_error($GLOBALS["___mysqli_ston"]));	
//echo "Updated Successfully";
		
		}
		
		echo 1;
?>
