Hello web developers,,

i have manage to made a searchbox that displays the followng

LRN First Name Last Name Grade Section View Update Delete
2 Jane Doe 8 A View Update Delete
33 Jane Denice 7 C View Update Delete

Basically my problem is i just wanted that when we click the Delete link,, it will directly delete the students info in the database. How will i do that?? This has been my codes so far which needed your comments and correction.

PHP Code:
$session_id $_SESSION['admin_id'];
$session_id == null){
$id intval($_GET['id']);
$query = ("DELETE FROM student_information WHERE student_id = $id'");
$res mysql_query($query)or die (mysql_error() 
"<script language='javascript' type='text/javascript'>alert('Successfully Deleted!')</script>";
"<script language='javascript' type='text/javascript'>window.open('Admin_Home.php','_self')</script>";
i would be glad if someone can correct my codes, Thank you!!!