-
Notifications
You must be signed in to change notification settings - Fork 1
/
mechanicProfile.php
98 lines (91 loc) · 5.18 KB
/
mechanicProfile.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
<?php
session_start();
include('C:\xampp\htdocs\Mechanicnow\config.php');
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Montserrat&family=Stick+No+Bills:wght@600&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/style.css">
<title>Mechanic Now</title>
</head>
<body>
<?php
include('Mheader.php');
?>
<div class="master-container">
<section>
<form method="POST"> <?php //select transaction
$regeditid=$_SESSION["mechID"];
$sql="SELECT * from mechanic WHERE mechID=:regeditid";
$query=$dbh->prepare($sql);
$query->bindParam(':regeditid',$regeditid,PDO::PARAM_STR);
$query->execute();
$results=$query->fetchALL(PDO::FETCH_OBJ);
if($query->rowCount()>0)
{
foreach ($results as $result)
{
?>
<div class="master-container">
<section>
<div class="container">
<div class="profile-bg">
<h2>Personal Information</h2>
<div class="avatar-img"><img src="img/avatar.png" alt=""></div><br>
<input type="hidden" name="mechID" value="<?php echo htmlentities($result->mechID);?>"required="required" class="form-control">
<input type="text" class="textin imgspace" name="mechFirstname" value="<?php echo htmlentities($result->mechFirstname);?>"required="required" class="form-control">
<input type="text" class="textin" name="mechLastname" value="<?php echo htmlentities($result->mechLastname);?>"required="required" class="form-control">
<input type="text" class="textin" name="mechEmail" value="<?php echo htmlentities($result->mechEmail);?>"required="required" class="form-control">
<input type="text" class="textin" name="mechCnumber" value="<?php echo htmlentities($result->mechCnumber);?>"required="required" class="form-control">
<h4 style="padding-bottom: 1em;">Address</h4>
<div class="addresspanel" style="padding-bottom: 1em;">
<input type="text" id="Province" name="mechAddress" value="<?php echo htmlentities($result->mechAddress);?>" class="textin" placeholder="Province" style="width:90%;" required>
<input type="text" id="City" name="mechAddress" value="<?php echo htmlentities($result->mechAddress);?>" class="textin" placeholder="City" style="width:90%;" required>
<input type="text" id="Barangay" name="mechAddress" value="<?php echo htmlentities($result->mechAddress);?>" class="textin" placeholder="Barangay" style="width:90%;" required>
</div>
<select type="text" name="Specialization" class="textin" placeholder="Specialization" required>
<?php
$sql = "SELECT * from mechanic";
$query = $dbh -> prepare($sql);
$query -> execute();
$results1=$query->fetchAll(PDO::FETCH_OBJ);
$cnt=1;
if($query->rowCount() > 0)
{
foreach($results as $result1)
{
?>
<option value="<?php echo htmlentities($result1->Specialization);?>">
<?php
echo htmlentities($result1->Specialization);
?>
</option>
<?php
}
}
?>
</select>
<input type="text" class="textin" name="mechValidID" value="<?php echo htmlentities($result->mechValidID);?>"required="required" class="form-control">
</br>
</br>
<h2>Account Information</h2>
<input type="text" name="Username" value="<?php echo htmlentities($result->Username);?>" class="textin" placeholder="Username" required>
<input type="password" name="Password" value="<?php echo htmlentities($result->custPassword);?>" class="textin" placeholder="Password" required>
<!-- <button class="editbtn">Edit Information</button> -->
<a href="mechanicEditprofile.php?regeditid=<?php echo htmlentities($result->mechID)?>">Edit Information</a>
</div>
</div>
<?php }}?>
</form>
</section>
<?php include('Mbootom-nav.php');?>
</div>
<script src="js/main.js"></script>
</body>
</html>