-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaccept_reject.php
More file actions
39 lines (29 loc) · 935 Bytes
/
accept_reject.php
File metadata and controls
39 lines (29 loc) · 935 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php
session_start();
//Incase no one is logged in
if(!isset($_SESSION['register']))
{
$header="Location: logout.php";
header($header);
}
// Checks if data is recieved fro GET METHOD
if(isset($_GET['act']) && isset($_GET['msg']) && isset($_GET['id']))
{
// Database connectivity.
require('generic_php/db_connect.php');
$conn= new db_connector;
$conn->coonect_now();
if($_GET['act']=='a')
{
$status="accepted";
}
else {
$status="rejected";
}
$user_email=$_SESSION['register'];
// Datbase updation
$sql = "UPDATE documents SET notification='sender', notificaton_type='".$status."', notification_message='".$_GET['msg']."' WHERE id ='".$_GET['id']."'";
$run=mysql_query($sql);
echo $status;
}
?>