Skip to content

Commit e82a8e1

Browse files
author
shahriar
committed
just change in delete cource...
1 parent 908e1a4 commit e82a8e1

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

delete_course.php

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<?php
2+
include 'includes/functions.php';
3+
?>
4+
<?php
5+
include 'includes/session.php';
6+
?>
7+
<?php confirm_logged_in(); ?>
8+
<?php
9+
if (!$_GET['email']) {
10+
redirect_to("index.php");
11+
}
12+
?>
13+
<?php
14+
include 'includes/connection.php';
15+
?>
16+
17+
<?php
18+
global $connection;
19+
$query = "DELETE FROM course WHERE id = '{$_GET['id']}'";
20+
21+
$result = mysql_query($query, $connection);
22+
23+
if (mysql_affected_rows($connection) == 1) {
24+
redirect_to("list.php");
25+
} else {
26+
redirect_to("list.php");
27+
}
28+
?>
29+
30+
<?php
31+
include 'includes/closeconnection.php';
32+
?>

0 commit comments

Comments
 (0)