-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy patheditprofile.php
84 lines (69 loc) · 2.4 KB
/
editprofile.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
75
76
77
78
79
80
81
82
83
84
<?php include("db_connect.php") ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<LINK href="stylesheet.css" rel="stylesheet" type="text/css">
</head>
<body>
<div class="header">
<img src="logo.jpg"/>
</div>
<div class="body">
<table padding-left="5px" cellspacing="0">
<tr><td class="blank"></td>
<td class="tab2"><a href="home.php">home</a></td>
<td class="tab1">profile</td>
<td class="tab3"><a href="calendar.php">calendar</a></td>
<td class="tab4"><a href="groups.php">groups</a></td>
<td class="login"><font color="#ffffff">Welcome! | </font><a href="logout.php"> logout</a></td>
</tr></table>
<table cellspacing="0"><tr>
<td class="content"><a href="profile.php"> back</a><h2>Edit Profile</h2><h4>
<form method="post" action="prof_edits_submitted.php">
<table>
<tr><td>New Bio</td><td><textarea rows="10" cols="50" name="Bio" value=
<?php
$name = $_SESSION['username'];
$query = "select Bio from users WHERE username = '$name'";
$result = mysqli_query($db, $query);
while($row = mysqli_fetch_array($result)){
$content = $row['Bio'];
echo("<h5>$content");
}
?>
</textarea></td></tr>
<tr><td>New Email</td><td> <input type="text" name="email" size="50" value=
<?php
$name = $_SESSION['username'];
$query = "select eMail from users WHERE username = '$name'";
$result = mysqli_query($db, $query);
while($row = mysqli_fetch_array($result)){
$content = $row['eMail'];
echo("$content");
}
?>
>
</td></tr>
<tr><td>Enter path to new avatar</td><td> <input type="text" name="avatar" size="50" value=
<?php
$name = $_SESSION['username'];
$query = "select avatar from users WHERE username = '$name'";
$result = mysqli_query($db, $query);
while($row = mysqli_fetch_array($result)){
$content = $row['avatar'];
echo("$content");
}
?>
>
</td></tr>
</textarea></td></tr>
<tr><td>New Password</td><td> <input type="password" name="password" size="50">
</td></tr>
<tr><td></td><td><input type="Submit" value="Save Edits"></td></tr>
</table>
</form>
</h4></td></tr>
</table
</div>
</body>
</html>