forked from code-for-india/cfi-lightning
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathuser.php
22 lines (22 loc) · 755 Bytes
/
user.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?php ob_start(); ?>
<?php include('config.php') ?>
<?php
session_start();
$afterurl="http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
$email = $_SESSION["email"] ;
$query = "SELECT * FROM users WHERE Email ='$email'";
$result = mysql_query($query);
$row = mysql_fetch_array($result);
$id = $row[0];
if (isset($_GET['ID']) )
$postid = $_GET['ID'];
$subquery = "SELECT * FROM users WHERE Email='$postid'";
$subres = mysql_query($subquery);
$wtf = mysql_fetch_array($subres);
echo($wtf[3] . " - " . $wtf[1]);
if ($wtf[$id] == 2)
echo("<br>Friend");
else
echo("<br>Not Friend");
echo("<form name='forma' action='request.php?ID=" . $postid . "' method='post'><input type='submit' value='Friend Request'> </input></form>");
?>