-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathunfollow.php
More file actions
40 lines (26 loc) · 780 Bytes
/
Copy pathunfollow.php
File metadata and controls
40 lines (26 loc) · 780 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
40
<?php
if($_GET["cata"])
{
session_start();
$v=$_GET["cata"];
$uid=$_SESSION["user"];
$con=mysqli_connect("localhost","root","","festhub");
$res=mysqli_query($con,"select * from `college` where `col_id`='$v'");
while($val=mysqli_fetch_array($res))
{
//$con=mysqli_connect("localhost","root","","ecommerce");
$fo=$val[3];
$fo=$fo-1;
$query="update `college` set `follow`='$fo' where `col_id`='$v'";
echo $query;
mysqli_query($con,$query);
mysqli_query($con,"DELETE FROM `follow` WHERE `user_id` = '$uid' and `col_id` = '$v'");
header("location:clgprof.php?cat=$v");
}
}
else
{
echo"<script language='javascript'> alert('You will have to login first.')</script>";
header("location:signUpLogin.php");
}
?>