We will integrate the user application file at the very beginning of each interface file. So, follow these steps to create various user interfaces:
1. Open
index.php
and integrate theUserApplication
class so that it looks as follows:<?php require_once 'UserApplication.php'; ?> <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title></title> </head> <body> </body> </html>
And all the interface codes can be inside the body tag.
2. Now, let's create a logged-in user menu that shows the status message (if any), logged-in username, and menus at the top of each page. Create a new PHP file named
menu.php
, and type in the following code:<?php if (isset($validator->statusMsg)) { echo "<span style=\"color:#207b00;\">" . $validator->statusMsg . "</span>"; } if ($userService->logged_in) { echo "<h2>Welcome $userService...