-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuserprofile.php
110 lines (97 loc) · 3.57 KB
/
userprofile.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
<?php
include('header.php');
include('Db_con.php');
$user = $_SESSION['id'];
error_reporting(0);
$query = "SELECT * FROM `recipe_user` where id = '$user'";
$result = mysqli_query($conn, $query);
//echo'USER EXIST';
if (mysqli_num_rows($result)>0){
while($rs = mysqli_fetch_array($result))
{
if($rs['picture']!="")
{
$pic ="http://localhost/recipejugaad/upload/".$rs['picture'];
}
else
{
$pic ="http://localhost/recipejugaad/upload/logo.png";
}
$name = $rs["first_name"];
$email = $rs["email"];
$phone =$rs["phone"];
$bday=$rs["bday"];
$pass=$rs["confirm_pass"];
}
}
else{
echo "sorry";
}
?>
<div class="wrapper">
<div class="header header-filter"> </div>
<div class="main main-raised">
<div class="section section-basic">
<div class="container">
<div class="row tim-row">
<div class="col-md-4">
<ul class="profile-ul">
<li>
<br><br>
<img src="<?php echo $pic; ?>" class="profile-image" width="200px" height="200px"><br><br>
<span class="profile-image-span"><?php echo $name ?></span><br>
</li>
</ul>
</div>
<div class="col-md-8">
<div class="card card-signup">
<form class="form" method="post" action="updateprofile.php" enctype="multipart/form-data">
<div class="header header-primary text-center">
<h4>Your Details</h4>
</div>
<div class="content">
<div class="input-group">
<span class="input-group-addon">
<i class="material-icons">account_circle</i>
</span>
<input type="text" class="form-control" placeholder="Name" id="name" name="name" value="<?php echo $name ?>">
</div>
<div class="input-group">
<span class="input-group-addon">
<i class="material-icons">email</i>
</span>
<input type="email" class="form-control" placeholder="Email" id="email" name="email" value="<?php echo $email ?>">
</div>
<div class="input-group">
<span class="input-group-addon">
<i class="material-icons">local_phone</i>
</span>
<input type="number" placeholder="Phone" class="form-control" id="phone" onblur="checkLen(this)" name="phone" value="<?php echo $phone ?>"/>
</div>
<div class="input-group">
<span class="input-group-addon">
<i class="material-icons">date_range</i>
</span>
<input type="date" placeholder="Birth Date" class="form-control" id="bday" name="bday" value="<?php echo $bday ?>"/>
</div>
<div class="input-group">
<span class="input-group-addon">
<i class="material-icons">photo_camera</i>
</span><br>
<input type="file" name="image">
</div>
</div>
<div class="footer text-center">
<input type="submit" class="btn btn-simple btn-primary btn-lg" value="UPDATE"></input>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<?php
include('footer.php');
?>