<?php
session_start();
if(!isset($_SESSION['username']) || !isset($_SESSION['password'])){
 header("Location: index.php");
}
$conn=mysqli_connect("localhost", "comeadve_glory1", "Safari#@2027$", "comeadve_tdmc");
if (mysqli_connect_errno())
  {
  echo "Failed to connect to MySQL: " . mysqli_connect_error();
  }

$sqll = "UPDATE tentcrew
        SET Status='0'
        WHERE (Status =1)";
$rest=mysqli_query($conn,$sqll);	

if($rest){
	header("location:select.php");
	}
else{
		
	echo"erro in connection";
	}
mysqli_close($conn);	

?>