-
Notifications
You must be signed in to change notification settings - Fork 1
/
edit-profile.php
105 lines (92 loc) · 2.6 KB
/
edit-profile.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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
<?php
session_start();
if(!$_SESSION['SESS_MEMBER_ID']) exit();
include 'header.php';
?>
<!-- Left Content Starts Here -->
<div class="mainbar">
<p class="headings">Edit Profile</p>
<h2><b><?php
if( isset($_SESSION['ERRMSG_ARR']) && is_array($_SESSION['ERRMSG_ARR']) && count($_SESSION['ERRMSG_ARR']) >0 ) {
echo ("Please fill the form again");
}?>
</font></b></h2>
<?php
include("database.php");
$username=$_SESSION['SESS_MEMBER_ID'];
$query=mysql_query("SELECT * FROM user_login WHERE member_id='$username'");
$x=mysql_fetch_assoc($query);
?>
<p>
<form method="post" action="edit-profile-exec.php">
<table width="384" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<th><label for="fname">First Name</label> </th>
<td>
<b><?php echo $x['firstname'];?></b>
</td>
</tr>
<tr>
<th> </th><td> </td></tr>
<tr>
<th><label for="lname">Last Name</label> </th>
<td>
<b><?php echo $x['lastname'];?></b>
</td>
</tr>
<tr>
<th> </th><td> </td></tr>
<tr>
<th width="158"><label for="login">Username</label></th>
<td width="215">
<b><?php echo $x['login'];?></b>
</td>
</tr>
<tr>
<th> </th><td> </td></tr>
<tr>
<th><label for="email">Email</label> </th>
<td><b><?php echo $x['email'];?></b></td>
</tr>
<tr><th> </th><td> </td></tr>
<tr>
<th><label for="college">College</label> </th>
<td><b><input type="text" name="college" class="textfield" id="college" value="<?php echo $x['college'];?>"/></b> </td>
</tr>
<tr><th> </th><td> </td></tr>
<tr>
<th><label for="contact">Contact</label> </th>
<td><b><input type="text" class="textfield" id="contact" name="contact" value="<?php echo $x['contact'];?>"></b></td>
</tr>
<tr><th> </th><td> </td></tr>
<tr>
<th> </th>
<td><input type="submit" value=" Update "></td>
</tr>
<tr><th> </th><td> </td></tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
</tr>
<tr><th> </th><td> </td></tr>
</table>
<br><br><br>
</form>
<?php
if( isset($_SESSION['ERRMSG_ARR']) && is_array($_SESSION['ERRMSG_ARR']) && count($_SESSION['ERRMSG_ARR']) >0 ) {
echo '<ul class="err">';
foreach($_SESSION['ERRMSG_ARR'] as $msg) {
echo '<li>',$msg,'</li>';
}
echo '</ul>';
unset($_SESSION['ERRMSG_ARR']);
}
?>
</p>
</div>
<?php
include 'footer.php'
?>