-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathprofile.php
More file actions
88 lines (74 loc) · 1.86 KB
/
profile.php
File metadata and controls
88 lines (74 loc) · 1.86 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<?php
session_start();
?>
<!DOCTYPE html>
<html>
<head>
<title>
feed page
</title>
<style>
#prof{
z-index:-1;
}
#prof1{
}
</style>
</title>
</head>
<body>
<?php
//session_start();
if(!isset($_SESSION["username"])){
echo "you are logged out";
}
else
{
include("config.php");
if (isset($_SESSION["username"]))
echo "<p> my name is </p>".$_SESSION["username"];
?>
<img id="prof" src="./uploads/<?php include ("config.php");
$sql1 = "SELECT profile FROM shivansh_people where username = '".$_SESSION["username"]."';";
$result = $con->query($sql1);
$row = $result->fetch_assoc();
echo $row["profile"]; ?>" height='10%' width='10%'><br>
<img id="prof2" src="./upload1/<?php include ("config.php");
$sql2 = "SELECT background FROM shivansh_people where username = '".$_SESSION["username"]."';";
$result = $con->query($sql2);
$row = $result->fetch_assoc();
echo $row["background"]; ?>" height='15%' width='25%'>
<form name="profile" action="upload.php" method="post" enctype="multipart/form-data">
Select image to upload:
<input type="file" name="fileToUpload" id="fileToUpload">
<input type="submit" value="Upload Image" name="submit">
</form>
Select back image:
<form name="cover" action="upload1.php" method="post" enctype="multipart/form-data">
<input type="file" name="fileToUpload1" id="fileToUpload1">
<input type="submit" value="Upload Image" name="submit">
</form>
<form action="logout.php" method="post">
<input type="submit" value="logout">
</form>
<form action="updateprofile.php" method="post">
<input type="submit" value="Update Profile">
</form>
<form action="pass.php" method="post">
<input type="submit" value="change password">
</form>
<form action="feedpage.php" method="post">
<input type="submit" value="go to feeds">
</form>
<?php
if($con)
{
echo "connected";
}}
?>
</form>
<script>
document.getElementById("myImg").src = "hackanm.gif";
</script>
</body>
</html>