-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprofile.php
59 lines (55 loc) · 2.56 KB
/
profile.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
<div style=" background: url('https://media.istockphoto.com/photos/abstract-blur-blue-gradient-color-background-with-bokeh-round-light-picture-id1310553941?b=1&k=20&m=1310553941&s=170667a&w=0&h=ceXJ-ZDLHlygjY53FQTNp5xpQ9lqRCkjD-RMJGUSvp0=') no-repeat center center;background-size: cover;height:105%;" >
<?php
session_start();
require_once "./functions/database_functions.php";
$title = "Profile";
require "./template/header.php";
// connect database
if(isset($_SESSION['email'])){
$customer = getCustomerIdbyEmail($_SESSION['email']);
?>
<form method="post" action="editProfile.php" class="form-horizontal">
<div class="form-group">
<label for="exampleInputEmail1">Firstname</label>
<input type="text" class="form-control" aria-describedby="emailHelp" value="<?php echo $customer['firstname']?>" name="firstname">
</div>
<div class="form-group">
<label for="exampleInputEmail1">Lastname</label>
<input type="text" class="form-control" aria-describedby="emailHelp" value="<?php echo $customer['lastname']?>" name="lastname">
</div>
<div class="form-group">
<label for="exampleInputEmail1">Email</label>
<input type="email" class="form-control" aria-describedby="emailHelp" value="<?php echo $customer['email']?>" name="email">
</div>
<div class="form-group">
<label for="inputAddress">Address</label>
<input type="text" class="form-control" id="inputAddress" value="<?php echo $customer['address']?>" name="address">
</div>
<div class="form-row">
<div class="form-group col-md-2">
</div>
<div class="form-group col-md-4">
<label for="inputCity">City</label>
<input type="text" class="form-control" id="inputCity" name="city" value="<?php echo $customer['city']?>">
</div>
<div class="form-group col-md-2">
</div>
<div class="form-group col-md-4">
<label for="inputZip">Zip</label>
<input type="text" class="form-control" id="inputZip" name="zipcode" value="<?php echo $customer['zipcode']?>">
</div>
</div>
<br>
<div class="form-group col-md-12" >
<div class="form-group" >
<div class="col-lg-10 col-lg-offset-2" style="margin-left:0px">
<button type="reset" class="btn btn-default">Cancel</button>
<button type="submit" class="btn btn-primary">Edit</button>
</div>
</div>
</form>
<?php
}
if(isset($conn)){ mysqli_close($conn); }
require_once "./template/footer.php";
?>