-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrev_mem.php
More file actions
29 lines (24 loc) · 769 Bytes
/
rev_mem.php
File metadata and controls
29 lines (24 loc) · 769 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
<?php
session_start();
require 'database_open.inc.php';
$email = $_POST['rev'];
$q = $_SESSION['click_grp'];
$query = "SELECT `Id` FROM `users` WHERE `email`='$email'";
$query_run = mysql_query($query);
$query_data = mysql_fetch_assoc($query_run);
$query3 = "SELECT `members` FROM `group` WHERE `name`='$q'";
$query_run3 = mysql_query($query3);
$query_data3 = mysql_fetch_assoc($query_run3);
$len = strlen((string)$query_data3['members']);
for($i = 0;$i<$len;$i++)
{
if($query_data['Id'] == substr($query_data3['members'],$i,1))
{
$mem = str_replace($query_data['Id'],'',$query_data3['members']);
$query = "UPDATE `group` SET `members`='$mem' WHERE `name`='$q'";
mysql_query($query);
break;
}
}
header('Location: messages.php');
?>