-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathedit.php
More file actions
124 lines (103 loc) · 4.37 KB
/
Copy pathedit.php
File metadata and controls
124 lines (103 loc) · 4.37 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
<?php include 'connection.php';?>
<?php
if(isset($_GET['edit']))
{
$edit_id= $_GET['edit'];
}
?>
<?php include 'header.php';?>
<html>
<body class="w3-light-grey">
<!-- Page Container -->
<div class="w3-content w3-margin-top" style="max-width:1400px;">
<!-- The Grid -->
<div class="w3-row-padding">
<!-- Left Column -->
<div class="w3-third">
<div class="w3-white w3-text-grey w3-card-4">
<div class="w3-display-container">
<img src="https://images.unsplash.com/photo-1507679799987-c73779587ccf?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1351&q=80" style="width:100%" alt="Avatar">
<div class="w3-display-bottomleft w3-container w3-text-black">
<h2 style="color:white;">Selvakkumar S</h2>
</div>
</div>
<div class="w3-container">
<p><i class="fa fa-briefcase fa-fw w3-margin-right w3-large w3-text-orange"></i>Designer</p>
<p><i class="fa fa-home fa-fw w3-margin-right w3-large w3-text-orange"></i>india,coimbatore</p>
<p><i class="fa fa-envelope fa-fw w3-margin-right w3-large w3-text-orange"></i>sselvakkumar12@mail.com</p>
<p><i class="fa fa-phone fa-fw w3-margin-right w3-large w3-text-orange"></i>9159266344</p>
<hr>
<p class="w3-large"><b><i class="fa fa-asterisk fa-fw w3-margin-right w3-text-orange"></i>Skills</b></p>
<?php
$sql= "SELECT * FROM `skills`";
$result = mysqli_query($conn, $sql);
while($row = mysqli_fetch_assoc($result)) {
?>
<p><?php echo $row["skillname"];?></p>
<div class="w3-light-grey w3-round-xlarge w3-small">
<div class="w3-container w3-center w3-round-xlarge w3-orange" style="width:<?php echo $row["skilllevel"]; ?>%"><?php echo $row["skilllevel"]; ?>%</div>
</div>
<?php }
?>
<p class="w3-large w3-text-theme"><b><i class="fa fa-globe fa-fw w3-margin-right w3-text-orange"></i>Languages</b></p>
<p>English</p>
<div class="w3-light-grey w3-round-xlarge">
<div class="w3-round-xlarge w3-orange" style="height:24px;width:100%"></div>
</div>
<p>Spanish</p>
<div class="w3-light-grey w3-round-xlarge">
<div class="w3-round-xlarge w3-orange" style="height:24px;width:55%"></div>
</div>
<p>German</p>
<div class="w3-light-grey w3-round-xlarge">
<div class="w3-round-xlarge w3-orange" style="height:24px;width:25%"></div>
</div>
<br>
</div>
</div><br>
<!-- End Left Column -->
</div>
<!-- Right Column -->
<div class="w3-twothird">
<?php
if(isset($_POST['editskills']))
{
$name =$_POST['sname'];
$level=$_POST['level'];
$sql="UPDATE `skills` SET `skillname` = '$name', `skilllevel` = '$level' WHERE `skills`.`id` = $edit_id ";
if(mysqli_query($conn, $sql)){
echo"<script>window.location='index.php'; </script>";
}
}
$sql= "SELECT * FROM `skills` WHERE id=$edit_id";
$result = mysqli_query($conn, $sql);
$row = mysqli_fetch_assoc($result);
?>
<div class="w3-container w3-card w3-white w3-margin-bottom">
<h2 class="w3-text-grey w3-padding-16">
<i class="fa fa-suitcase fa-fw w3-margin-right w3-xxlarge w3-text-orange"></i>
Edit Skills
</h2>
<form class="w3-container w3-card-4" action="" method='post'>
<p>
<label class="w3-text-blue"><b>Skill Name</b></label>
<input class="w3-input w3-border" name="sname" value="<?php echo $row['skillname'];?>" type="text">
</p>
<p>
<label class="w3-text-blue"><b>Skill level</b></label>
<input class="w3-input w3-border" name="level" value="<?php echo $row['skilllevel'];?>" type="number">
</p>
<p>
<button class="w3-btn w3-blue" name="editskills">Update</button>
</p>
</form>
</div>
<!-- End Right Column -->
</div>
<!-- End Grid -->
</div>
<!-- End Page Container -->
</div>
</body>
<?php include 'footer.php';?>
</html>