|
12 | 12 | <form> |
13 | 13 | <label>first name <input name="firstName"/></label><br> |
14 | 14 | <label>last name <input name="lastName"/></label><br> |
15 | | - <label>street <input name="address[street]"/></label><br> |
16 | | - <label>zip <input name="address[zip]"/></label><br> |
17 | | - <label>city <input name="address[city]"/></label><br> |
| 15 | + <h2>invoice address</h2> |
| 16 | + <label>street <input name="invoiceAddress[street]"/></label><br> |
| 17 | + <label>zip <input name="invoiceAddress[zip]"/></label><br> |
| 18 | + <label>city <input name="invoiceAddress[city]"/></label><br> |
| 19 | + <h2>delivery address (optional)</h2> |
| 20 | + <label>street <input name="deliveryAddress[street]"/></label><br> |
| 21 | + <label>zip <input name="deliveryAddress[zip]"/></label><br> |
| 22 | + <label>city <input name="deliveryAddress[city]"/></label><br> |
18 | 23 | <button type="submit">submit</button> |
19 | 24 | </form> |
20 | 25 | </body> |
|
28 | 33 | <head><title>commit hygiene example</title></head> |
29 | 34 | <body> |
30 | 35 | <h1><?= htmlspecialchars($user->getFirstName() . ' ' . $user->getLastName(), ENT_HTML5) ?></h1> |
| 36 | + <h2>invoice address</h2> |
31 | 37 | <p> |
32 | | - <?= htmlspecialchars($user->getAddress()->getStreet(), ENT_HTML5) ?><br> |
33 | | - <span style="font-size: larger"><?= htmlspecialchars($user->getAddress()->getZip(), ENT_HTML5) ?></span> <?= htmlspecialchars($user->getAddress()->getCity(), ENT_HTML5) ?> |
| 38 | + <?= htmlspecialchars($user->getInvoiceAddress()->getStreet(), ENT_HTML5) ?><br> |
| 39 | + <span style="font-size: larger"><?= htmlspecialchars($user->getInvoiceAddress()->getZip(), ENT_HTML5) ?></span> <?= htmlspecialchars($user->getInvoiceAddress()->getCity(), ENT_HTML5) ?> |
| 40 | + </p> |
| 41 | + <h2>delivery address</h2> |
| 42 | + <p> |
| 43 | + <?= htmlspecialchars($user->getDeliveryAddress()->getStreet(), ENT_HTML5) ?><br> |
| 44 | + <span style="font-size: larger"><?= htmlspecialchars($user->getDeliveryAddress()->getZip(), ENT_HTML5) ?></span> <?= htmlspecialchars($user->getDeliveryAddress()->getCity(), ENT_HTML5) ?> |
34 | 45 | </p> |
35 | 46 | </body> |
36 | 47 | </html> |
|
0 commit comments