-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodifyUserInfo.php
More file actions
135 lines (109 loc) · 4.73 KB
/
Copy pathmodifyUserInfo.php
File metadata and controls
135 lines (109 loc) · 4.73 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
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
<?php
include_once "borders.php";
if (!isset($_SESSION['id'])) {
header("Location: index.php");
exit();
}
?>
<link href="bootstrap/css/modifyUserInfoStyle.css" rel="stylesheet">
<form action="you.php" method="post" class="backForm">
<input type="submit" name="submit" value="Back" class="btn btn-primary"/>
</form>
<div class="updateProfile">
<h2>Update Information</h2>
<form action="update.php" method="POST" enctype="multipart/form-data">
<?php
include_once "database.php";
$id = $_SESSION['id'];
$sql = "SELECT * FROM `user` WHERE IDUser = '$id'";
$res = mysqli_fetch_assoc(mysqli_query($conn, $sql));
$first = $res['FirstNameUser'];
$last = $res['NameUser'];
$pseudo = $res['Pseudo'];
echo '
<div class="form-group">
<label>New first name</label>
<input type="text" name="firstName" value="'.$first.'" class="form-control field">
</div>
<div class="form-group">
<label>New surname</label>
<input type="text" name="lastName" value="'.$last.'" class="form-control field">
</div>
<div class="form-group">
<label> New alias</label>
<input type="text" name="pseudo" value="'.$pseudo.'" class="form-control field">
</div>
<div class="form-group">
<label>New Password</label>
<input type="password" name="pwd1" placeholder="Previous password" class="form-control field">
</div>
<div class="form-group">
<input type="password" name="pwd2" placeholder="New Password" class="form-control field">
<input type="password" name="pwd3" placeholder="Confirm New Password" class="form-control field">
</div>
<div class="form-group">
<label>Change profile picture</label>
<input type="file" name="pp" class="field">
</div>
<div class="form-group">
<label>Change background picture</label>
<input type="file" name="bp" class="field">
</div>
<div class="form-group">
<label>upload a Curriculum Vitae</label>
<input type="file" name="cv" class="field">
</div>
';
?>
<button type="submit" name="submit" class="btn btn-success">Update</button>
</form>
</div>
<div class="updateExperiences">
<h2>Add or Delete Experiences</h2>
<form action="addExperience.php" method="post">
<div class="form-group">
<label>Company Name</label>
<input type="text" name="companyName" placeholder="company Name" class="form-control field">
</div>
<div class="form-group">
<label>Experience description</label>
<input type="text" name="Edescription" placeholder="description" class="form-control field">
</div>
<button type="submit" name="submit" class="btn btn-primary">Add</button>
</form>
<form action="deleteExperience.php" method="post" enctype="multipart/form-data">
<div class="form-group">
<label>Company</label>
<input type="text" name="company" placeholder="company Name" class="form-control field">
</div>
<div class="form-group">
<label>Position</label>
<input type="text" name="position" placeholder="Position" class="form-control field">
</div>
<button type="submit" name="submit" class="btn btn-danger">Delete</button>
</form>
</div>
<div class="updateRealisations">
<h2>Add or Delete Realisations</h2>
<form action="addRealisation.php" method="post" enctype="multipart/form-data">
<div class="form-group">
<label>Project Name</label>
<input type="text" name="project" placeholder="project" class="form-control field">
</div>
<div class="form-group">
<label>Project Description</label>
<input type="text" name="Pdescription" placeholder="description" class="form-control field">
</div>
<button type="submit" name="submit" class="btn btn-primary">Add</button>
</form>
<form action="deleteRealisation.php" method="post" enctype="multipart/form-data">
<div class="form-group">
<label>Realisation to delete (project number)</label>
<input type="number" name="projectID" placeholder="project number" class="form-control field">
</div>
<button type="submit" name="submit" class="btn btn-danger">Delete</button>
</form>
</div>
<?php
include_once "footer.php";
?>