-
Notifications
You must be signed in to change notification settings - Fork 0
/
updateprofile2.php
381 lines (318 loc) · 12.5 KB
/
updateprofile2.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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
<?php
ob_start();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<html>
<head>
<title>CodersClub.com-Rent A Coder</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link href="style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/cufon-yui.js"></script>
<script type="text/javascript" src="js/arial.js"></script>
<script type="text/javascript" src="js/cuf_run.js"></script>
</head>
<body>
<div class="main">
<div class="header">
<div class="header_resize">
<div class="logo"><h1><a href="welcome2.php"><small>Where Buyers meet Coders!! </small><span>Coders</span>Club.com</a></h1></div>
<div class="menu_nav">
<p align="right"><font color="white">
<?php
session_start();
echo "You Login As ".$_SESSION['uname'];
if($_SESSION['uname']=='')
{
header('location:index.php');
}
else
{
?></font> |
<a href="logout.php">Logout</a></p>
<ul><li><a href="welcome2.php"><span><span>Home</span></span></a></li>
<li><a href="contact2.php"><span><span>Contacts</span></span></a></li></ul>
</div>
<div class="clr">
</div>
<?php
include_once('menu2.php');
?>
</div>
</div>
<div class=""></div>
<div class="content">
<div class="content_resize">
<div class="mainbar">
<div class="article">
</div>
<div class="article">
<h2><span>Edit My Profile</span></h2><div class="clr"></div>
<div class="clr"></div>
<?php
/*this code is done to the update the record selected */
include_once('conn.php');
session_start();
$profile=$_SESSION['uname'];
$upd=$_REQUEST['u'];// upd is the flag to check the update is set or not.
if($upd==1)// the varibale is checked whether the flag is 1 or not
{
$profile=$_REQUEST['id']; // to fetch the id selected
$qry_da="select * from login where username=$profile"; // query to fetch the record of the selected id
$rs_da=mysql_query($qry_da); // execution of the query
$row_da=mysql_fetch_array($rs_da); // to fetch tha array of query result
?>
<form method="post">
<ol><li>
<label>First Name</label>
<input type="text" name="txt_fname" value="<?php echo $row_da['fname'] ?>">
</li><li>
<label>Last Name</label>
<input type="text" name="txt_lname" value="<?php echo $row_da['lname'] ?>">
</li><li>
<label>Gender</label>
<?php
// to check what is the gender if M then the male is checked
if($row_da['gender']=='Male')
{
?>
<input type="radio" name="rb_gender" value="Male" checked="checked">Male <input type="radio" name="rb_gender" value="Female">Female
<?php
}
else if($row_da['gender']=='Female')
{
?>
<input type="radio" name="rb_gender" value="Male" >Male <input type="radio" name="rb_gender" value="Female" checked="checked">Female
<?php
}
else
{
?>
<input type="radio" name="rb_gender" value="Male">Male <input type="radio" name="rb_gender" value="Female">Female
<?php
}
?>
</li><li>
<label>Skills:</label>
<table width="90%">
<tr>
<?php
$skil_di=explode(' , ',$row_da['skill']);
//var_dump($hob_di);
?>
<?php
if($skil_di[0]=='web designing')
{
?>
<td><input type="checkbox" name="chk_skill[]" value="web designing" checked="checked">Web designing</td>
<?php
}
else
{
?>
<td><input type="checkbox" name="chk_skill[]" value="web designing">Web designing</td>
<?php
}
if($skil_di[0]=='php' || $hob_di[1]=='php')
{
?>
<td><input type="checkbox" name="chk_skill[]" value="php" checked="checked">Php</td>
<?php
}
else
{
?>
<td><input type="checkbox" name="chk_skill[]" value="php">Php</td>
<?php
}
if($skil_di[0]=='database' || $hob_di[1]=='database' || $hob_di[2]=='database' )
{
?>
<td><input type="checkbox" name="chk_skill[]" value="database">Database Administration</td>
<?php
}
else
{
?>
<td><input type="checkbox" name="chk_skill[]" value="database">Database Administration</td></tr>
<?php
}
?>
</li><li>
<label>Email:</label>
<input type="text" name="txt_email" class="text" value="<?php echo $row_da['email'] ?>">
</li><li>
<label>country:</label>
<select name="cmb_country" class="sel" id="country" onchange="showUser(this.value)">
<?php
include_once('conn.php');
$sql = "SELECT * FROM country order by cname";
$res=mysql_query($sql);
while($row=mysql_fetch_array($res))
{
echo "<option value=".$row['cid'].">" .$row['cname']."</option>";
}
?>
</select>
<label>State</label>
<?php
$st_qy="select * from state order by sname"; // to fetch the state from the table state
$rs=mysql_query($st_qy);
?>
<select name="cmb_state">
<?php
// to display all states
while($row=mysql_fetch_array($rs))
{
// check which state is there in the record or not..
if($row[1]==$row_da['state'])
{
?>
<option value="<?php echo $row[1]; ?>" selected="selected"><?php echo $row[1]; ?></option>
<?php
}
else
{
?>
<option value="<?php echo $row[1]; ?>"><?php echo $row[1]; ?></option>
<?php
}
}
?>
</select>
<label>City</label>
<?php
$st_qy="select * from city order by sname"; // to fetch the state from the table state
$rs=mysql_query($st_qy);
?>
<select name="cmb_city">
<?php
// to display all states
while($row=mysql_fetch_array($rs))
{
// check which state is there in the record or not..
if($row[1]==$row_da['state'])
{
?>
<option value="<?php echo $row[1]; ?>" selected="selected"><?php echo $row[1]; ?></option>
<?php
}
else
{
?>
<option value="<?php echo $row[1]; ?>"><?php echo $row[1]; ?></option>
<?php
}
}
?>
</select>
<label>User Name</label>
<input type="text" name="txt_uname" value="<?php echo $row_da['username'] ?>">
</li><li>
<label>Password</label>
<input type="password" name="txt_pass" value="<?php echo $row_da['password'] ?>">
</li><li>
<label>Add Skill:</label>
<input type="text" name="txt_addskill" class="text" value="<?php echo $row_da['addskill'] ?>">
</li><li>
<label>Company Name:</label>
<input type="text" name="txt_company" class="text" value="<?php echo $row_da['companyname'] ?>">
</li><li>
<label>Company Address:</label>
<textarea id="message" name="txt_companyadd" rows="5" cols="50" class="text" value="<?php echo $row_da['companyadd'] ?>"></textarea>
</li><li>
<input type="submit" value="Submit" name="btn_sub">
<input type="reset" value="Reset">
</form>
<?php
}
?>
<div class="clr"></div>
</li></ol>
</form>
</div>
</div>
<div class="sidebar"><br><br><br>
<center><div><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0"
width="1000" height="130">
<param name="movie" value="123ss.swf" />
<param name="quality" value="high" />
<param name="allowScriptAccess" value="always" />
<param name="wmode" value="transparent">
<embed src="123ss.swf"
quality="high"
type="application/x-shockwave-flash"
WMODE="transparent"
width="300"
height="200"
pluginspage="http://www.macromedia.com/go/getflashplayer"
allowScriptAccess="always" />
</object></div></center>
<font size="5" color="#0689D7" face="arial"><b>You can Post Project Its Free!!</b></font><br><br>
<img src="images/bidp1.jpg" />
<div class="col c2">
<ul class="sb_menu">
</ul>
<div class="clr">
</div>
<div class="clr">
</div>
<div class="gadget">
<h2 class="star"><span>Rent A Coder</span></h2><div class="clr"></div>
<ul class="ex_menu">
<li><a href="search_all2.php">Search</a><br /></li>
<li><a href="search_ruser2.php">Search users</a><br />You can search Registered users</li>
<li><a href="search_tech2.php">Search projects by technologies</a><br />You can search projects by its technologies</li>
<li><a href="search_pro2.php">Search projects by title</a><br />You can search projects by project title</li>
</ul>
</div>
</div>
</div>
<div class="clr">
</div>
</div>
</div>
<div class="fbg">
<div class="fbg_resize">
<div class="col c1">
<h2><span>About</span></h2>
<img src="images/white.jpg" width="56" height="56" alt="pix" />
<p>CodersClub.com is a large outsourcing and crowdsourcing marketplace for small business..We have many satisfied customers from all over the world. We connect over number of buyers and freelancers globally from over different countries regions. Through our website, buyers can hire freelancers..<a href="about2.php">Read more...</a></p>
</div>
<div class="col c2">
<h2><span>Join Us On..</span></h2>
<ul class="sb_menu">
<li><a href="#"><img src="images/f.jpg" alt="facebook"> facebook</a></li>
<li><a href="#"><img src="images/t.jpg" alt="twitter"> twitter</a></li>
<li><a href="#"><img src="images/l.jpg" alt="linkedIn"> linkedIn</a></li>
<li><a href="#"><img src="images/g.jpg" alt="google+"> googlePlus</a></li>
</ul>
</div>
<div class="col c3">
<h2>Contact</h2>
<p>You can contact with us through our site or can send us mail.</p>
<p><a href="contact2.php">CodersClub.com</a></p>
<p>+91 (846) 066-6940</p>
</div>
<div class="clr"></div>
</div>
</div>
<div class="footer">
<div class="footer_resize">
<p class="lf"> Copyright <a href="#">CodersClub.com</a>. Posted by CodersClub.com <a href="#">Rent A Coder</a></p>
<ul class="fmenu">
<li class="active"><a href="welcome2.php">Home</a></li>
<li><a href="term2.php">Terms</a></li>
<li><a href="about2.php">About Us</a></li>
<li><a href="contact2.php">Contacts</a></li>
</ul>
<div class="clr"></div>
</div>
</div>
</div>
</body>
</html>
<?php
}
?>