We shall put the interface elements inside index.php
, and embed the PHP code in an appropriate way. So, let's go through the steps:
1. Modify the
index.php
file inside the<body>
tag, drop the PHP tag, and place the status entries in the<div>
container tag and elements, as follows:<body> <div id="container" class="container"> <h1>Status Poster</h1> <ul> </ul> </div> </body>
From this code, you can see that our application interface will be within the
<div>
container with the id container, and the<ul>
tag will hold the inner<li>
items' stack containing the status posts from the users, which will be populated by some PHP codes.2. Above the
<!DOCTYPE html>
tag, at the top PHP code snippet of theindex.php
file, type the following lines to integrate theStatusPoster
class so that the code snippet looks similar to the following:<?php require_once 'StatusPoster...