| Current Path : /home/bolconlineco/public_html/admin/ |
| Current File : /home/bolconlineco/public_html/admin/deletestudent.php |
<?php
include('../includes/connection/func.inc.php');
if(isset($_GET['studentId']))
{
$id=sql_strip($_GET['studentId']);
$query1="select email from student where SId='$id'";
$result1=mysql_query($query1) or die(mysql_error());
$row=mysql_fetch_array($result1);
$email=$row['email'];
$query2="delete from admin where username='$email'";
mysql_query($query2) or die(mysql_error());
$query="delete from student where SId='$id'";
$result=mysql_query($query) or die(mysql_error());
$msg="Deleted Successfully";
header("location:viewstudent.php?msg=$msg");
exit();
}
?>