<?php

include("session_start.php");

include("session_check.php");include("database.php");

extract($_GET);

$query = mysql_query("delete FROM input_form where id='$id'");

//$query1 = mysql_query("delete FROM info where pid='$pid'");

$select= mysql_query("select * from info where aid='".$_GET['id']."'");

$num=mysql_num_rows($select);

while($num!=0)

{

	$query1 = mysql_query("delete FROM info where aid='".$_GET['id']."'");

	$num--;

}



if($query)

		{

			if($_GET['id']!="")

			{

		?>

		<script language="javascript" type="text/javascript">

		alert("Deleted Successfully");

		window.location="index_grid.php";

		</script>

		<?php

		}

		}

		/*if($query1)

		{

			if($_GET['pid']!="")

			{

		?>

		<script language="javascript" type="text/javascript">

		alert("Deleted Successfully from info");

		window.location="index_grid.php";

		</script>

		<?php

		}

		}*/

		?>



<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>Survey Application</title>

</head>



<body>

</body>

</html>