-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpostP.php
More file actions
52 lines (47 loc) · 1.39 KB
/
postP.php
File metadata and controls
52 lines (47 loc) · 1.39 KB
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
<?php
function profileuser($user_to_follow,$fetchalluserwithnophoto,$username)
{
require"conn.php";
$selectallusersprofile=mysqli_query($con,"SELECT * FROM profile where profile.user_id='$user_to_follow'");
#$selctusername=mysqli_select($con,"SELECT * FROM users WHERE unique_id='$user_to_follow'");
#$fetusername=mysqli_fetch_array($selectusername);
if ($selectallusersprofile) {
if (mysqli_num_rows($selectallusersprofile)>0) {
$fetchalluserprofile=mysqli_fetch_array($selectallusersprofile);
?>
<?php
$cover="images/".$fetchalluserprofile['profile'];
?>
<div class="userprofile ">
<a class="text-decoration-none " href="user.php?unique_id_profile=<?php echo($username) ?>">
<img src="<?php echo($cover)?>" class=" img-thumbnail " alt="profile">
</a>
</div>
<?php
}
else{
?>
<div class=" text-white p-2 text-center userprofileliked">
<?php
$new=$fetchalluserwithnophoto;
$upper_name=strtoupper($new);
$nee=substr(($upper_name),0,1);
echo("<h3>".$nee."</h3>");
?>
</div>
<?php
}
}else{
?>
<div class=" text-white p-4 text-center bg-primary shadow userprofile sticky-top top-0">
<?php
$new=$fetchalluserwithnophoto;
$upper_name=strtoupper($new);
$nee=substr(($upper_name),0,1);
echo("<h3>".$nee."</h3>");
?>
</div>
<?php
}
}
?>