-
Notifications
You must be signed in to change notification settings - Fork 0
/
namefind.php
74 lines (56 loc) · 1.97 KB
/
namefind.php
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<?php
// session_start();
// $servername = "localhost";
// $username = "root";
// $password = "";
// $dbname="ludo";
include("config.php");
$ghor= $_POST['ghuti'];
// $grpid = $_POST['grpid'];
// $seen = $_POST['seen'];
// $fromid =$_SESSION["id"];
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed:". $conn->connect_error);
}
$sql = "SELECT * FROM position where id='$ghor'";
// $sql = "UPDATE grpchatseen SET seen=1 where toid='$fromid' AND grpid='$grpid'";
// $sql = "UPDATE messages SET seento=1 where grpid='$grpid' AND ";
$result = $conn->query($sql);
// if ($result->num_rows > 0) {
// // output data of each row
// while($row = $result->fetch_assoc()) {
// echo "id: " . $row["id"]. " - Name: " . $row["username"]. " ". "<br>";
// }
// } else {
// echo "0 results";
// }
// $tname = array();
// $tpost= array();
// $fromid =$_SESSION['id'];
// $result=getmembers($n);
// echo $ghor;
$i=0;$temp="";
if ($result->num_rows > 0) {
while($row = $result->fetch_assoc()) {
// $tname[$i]=$row["name"];
// $tpost[$i]=$row["position"];
// $i++;
// $temp=$temp.'"'.$row["name"].'":'.'"'.$row["position"].'",';
// $temp=$temp.$row["name"];
// echo '';
// echo $row["name"]."ui";
// $temp=$temp.'<div onclick="ghuti(`'.$row["name"].','.$row["position"].'`)" style="margin: auto; height: 50%;width:50%;background-image: url('.$row["name"].'.jpeg);background-size: cover;border: 5px solid black;"></div>';
echo $row["name"];
}
}
else{
// echo `$ghor."ui"`;
}
// echo $temp."ui";
echo $temp;
$conn->close();
// return $ghor;
?>