Your IP : 216.73.217.79


Current Path : /var/www/cesa.co.za/Mailer/
Upload File :
Current File : /var/www/cesa.co.za/Mailer/destroySection.php

<?php
	require_once ('includes/globals.php');
	if (isset($_SESSION['database'])) {	
		if (isset($_SESSION['userid'])) {
			$userid = $_SESSION['userid'];
		} else {
			echo "<script>document.location.href='index.php';</script>\n";
		}
		
		$sql = "DELETE FROM Sections\n" .
			"where idSection = " . intval($_GET['id']);
		
		//echo $sql;
		$db = $_SESSION['database'];
		if ($db->Execute($sql) === false) {
			die("Could not delete section");
		} else {
		?>
		<script language="JavaScript" type="text/javascript">
			window.location = "manageSections.php?id=<?php echo intval($_GET['t']) ?>";
			//window.close();
		</script>
		<?php
		}
	} 
?>