-
Notifications
You must be signed in to change notification settings - Fork 0
/
user.tpl.php
28 lines (26 loc) · 1.37 KB
/
user.tpl.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
<?php declare(strict_types = 1); ?>
<?php function drawProfileForm(User $user, string $path) { ?>
<h2>Profile</h2>
<form action="../Pages/edit_profile_button.php?path=<?=$path?>" method="post" class="profile">
<label for="first_last_name"><p>First and Last Name:</p> <?=$user->firstLastName?><br></label>
<label for="address"><p>Address:</p> <?=$user->userAddress?><br></label>
<label for="phonenumber"><p>Phone Number:</p> <?=$user->phoneNumber?><br></label>
<label for="username"><p>Username:</p> <?=$user->username?><br></label>
<button type="submit">Edit</button>
</form>
<?php
} ?>
<?php function drawEditProfileForm(User $user, string $path) { ?>
<h2>Profile</h2>
<form action=<?=$path?> method="post" class="editprofile">
<label for="first_last_name"><p>First and Last Name:</p></label>
<input id="first_last_name" type="text" name="first_last_name" value="<?=$user->firstLastName?>">
<label for="address"><p>Address:</p></label>
<input id="address" type="text" name="address" value="<?=$user->userAddress?>">
<label for="phonenumber"><p>Phone Number:</p></label>
<input id="phonenumber" type="number" name="phonenumber" value="<?=$user->phoneNumber?>">
<label for="username"><p>Username:</p></label>
<input id="username" type="text" name="username" value="<?=$user->username?>"><br>
<button type="submit">Save</button>
</form>
<?php } ?>