<?php

	require_once 'dbconfig4.php';
	
	if(isset($_GET['stid']))
	{
		
		$stmt_select = $DB_con->prepare('DELETE logo FROM ormssettings WHERE stid =:stid');
		$stmt_select->execute(array(':stid'=>$_GET['stid']));
		$imgRow=$stmt_select->fetch(PDO::FETCH_ASSOC);
		unlink("images/settings/".$imgRow['logo']);
		
		$stmt_delete = $DB_con->prepare('DELETE FROM ormssettings WHERE stid =:stid');
		$stmt_delete->bindParam(':stid',$_GET['stid']);
		$stmt_delete->execute();
		
		//header("Location: settings.php");
		echo"<script type='text/javascript'>window.location.href = 'settings.php';</script>";
	}

?>