<?php
session_start
();
 if (
session_is_registered("valid_user"))
{
?>
<html>
<head>
<title>Delete Tech's Plan Complete </title>
</head>
<body bgcolor="#000000">
<?php
    
include("../include/FunctionDB.php");
    
ConnectDB();
    
$i 0;
    while(
$i count($checkbox))
    {
        
$Plan_code $checkbox[$i];
        
$strSQL "DELETE FROM tech_plan_tb WHERE Plan_code='$Plan_code'";
        
$result  mysql_query$strSQL) or die("Error $result".mysql_error());
        
$strSQL2 =  "DELETE FROM tech_spec_tb WHERE Plan_code='$Plan_code'";
        
$result2  mysql_query$strSQL2)or die("Error $result2".mysql_error());
        
$strSQL3 =  "DELETE FROM techplan_method_tb WHERE Plan_code='$Plan_code'";
        
$result3  mysql_query$strSQL3)or die("Error $result3".mysql_error());
        if (!
$result)
            return 
" Please check Query Again <br>";
         
$i++;
    }
         if (
$result)
     { 
        echo
"<center><font face=\"Tahoma\"size=\"6\" color=\"#FF0000\">Delete Complete</font></center>";
        echo
"<meta http-equiv=\"refresh\" content=\"1;URL=EditPlanList.php?Teacher_code=$Teacher_code\">";         
     }
    
CloseDB();
?>

<p>&nbsp;</p>

</body>
</html>
<?php 
    
}
else
{
       echo
"<meta http-equiv=\"refresh\" content=\"3;URL=../FrmLogin.php\">\n";
//    echo"Please Login ";
}
?>