-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f94f716
commit 89c8bba
Showing
1 changed file
with
97 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
<?php | ||
include("include/header.php"); | ||
|
||
require_once("../Modules/config.php"); | ||
|
||
$userid = $_GET['id']; | ||
|
||
$stmt = $conn->prepare("SELECT * FROM `Customers` WHERE `CustomerID` = :userid"); | ||
$stmt->bindValue(":userid", $userid, PDO::PARAM_INT); | ||
$stmt->execute(); | ||
$result = $stmt->fetchAll(PDO::FETCH_ASSOC); | ||
?> | ||
|
||
<div class="container mt-5" style="padding-bottom: 10rem;"> | ||
<h2>Edit Profile</h2> | ||
|
||
<form action="customer_profile_update.php" method="POST"> | ||
<?php | ||
foreach($result as $row) { | ||
?> | ||
<input type="hidden" name="customerid" value="<?php echo $userid ?>"> | ||
|
||
<!-- Username Input --> | ||
<div class="form-group" style="padding-top: 1rem;"> | ||
<label for="firstname">First name</label> | ||
<input type="text" class="form-control" id="firstname" name="firstname" placeholder="First name" value="<?php echo $row['FirstName']; ?>"> | ||
</div> | ||
|
||
<div class="form-group" style="padding-top: 1rem;"> | ||
<label for="lastname">Last name</label> | ||
<input type="text" class="form-control" id="lastname" name="lastname" placeholder="Last name" value="<?php echo $row['LastName']; ?>"> | ||
</div> | ||
|
||
<div class="form-group" style="padding-top: 1rem;"> | ||
<label for="email">Email</label> | ||
<input type="text" class="form-control" id="email" name="email" placeholder="Email" value="<?php echo $row['Email'] ?>"> | ||
</div> | ||
|
||
<div class="form-group" style="padding-top: 1rem;"> | ||
<label for="phone">Phone number</label> | ||
<input type="text" class="form-control" id="phone" name="phone" placeholder="Phone number" value="<?php echo $row['PhoneNumber']; ?>"> | ||
</div> | ||
|
||
<div class="form-group" style="padding-top: 1rem;"> | ||
<label for="address">Address</label> | ||
<input type="text" class="form-control" id="address" name="address" placeholder="Address" value="<?php echo $row['Address']; ?>"> | ||
</div> | ||
|
||
<div class="form-group" style="padding-top: 1rem;"> | ||
<label for="city">City</label> | ||
<input type="text" class="form-control" id="city" name="city" placeholder="City" value="<?php echo $row['City']; ?>"> | ||
</div> | ||
|
||
<div class="form-group" style="padding-top: 1rem;"> | ||
<label for="region">Region</label> | ||
<input type="text" class="form-control" id="region" name="region" placeholder="Region" value="<?php echo $row['State']; ?>"> | ||
</div> | ||
|
||
<div class="form-group" style="padding-top: 1rem;"> | ||
<label for="zipcode">Zip Code</label> | ||
<input type="text" class="form-control" id="zipcode" name="zipcode" placeholder="Zip code" value="<?php echo $row['ZipCode']; ?>"> | ||
</div> | ||
|
||
<div class="form-group" style="padding-top: 1rem;"> | ||
<label for="country">Country</label> | ||
<input type="text" class="form-control" id="country" name="country" placeholder="Country" value="<?php echo $row['Country']; ?>"> | ||
</div> | ||
|
||
<div class="form-group" style="padding-top: 1rem;"> | ||
<label for="oldpassword">Current password</label> | ||
<input type="password" class="form-control" id="currentpassword" name="currentpassword" placeholder="Current password"> | ||
</div> | ||
|
||
<div class="form-group" style="padding-top: 1rem;"> | ||
<label for="newpassword">New password</label> | ||
<input type="password" class="form-control" id="newpassword" name="newpassword" placeholder="New password"> | ||
</div> | ||
|
||
<div class="form-group" style="padding-top: 1rem;"> | ||
<label for="confirmpassword">Confirm password</label> | ||
<input type="password" class="form-control" id="confirmpassword" name="confirmpassword" placeholder="Confirm password"> | ||
</div> | ||
|
||
<!-- Update Button --> | ||
<div style="padding-top: 1rem;"> | ||
<button type="submit" class="btn btn-primary">Update Profile</button> | ||
</div> | ||
|
||
<?php | ||
} | ||
?> | ||
</form> | ||
</div> | ||
|
||
<?php | ||
include("include/footer.php"); | ||
?> |