<?php
	include 'includes/session.php';
	include 'includes/sessions.php'; 

	if(isset($_POST['submit'])){
	  

    
		$app_name = $_POST['app_name'];


		$sql = "INSERT INTO blacklist_app (app_name) VALUES ('$app_name')";
		if($conn->query($sql)){

			$_SESSION['success'] = 'Black List added successfully';
		}
		else{ 
			$_SESSION['error'] = $conn->error;
		}
	}	
	else{
		$_SESSION['error'] = 'Fill up add form first';
	}

	header('location: black_list_app.php');

?>