query($sql))
{
echo "New record is inserted successfully";
}
else
{
echo "Error: ". $sql ."
". $conn->error;
}
$conn->close();
}
}
else{
echo "Empty record";
}
}
if (isset($_POST['logout'])){
session_destroy();
$_SESSION = array();
header("location: home.php");
}
}
else{
session_destroy();
$_SESSION = array();
header("location: main.php");
}
?>