HomePHP Page 3 - Handling Entries for a Blogger Built with PHP
Defining the displayInsertForm() method - PHP
Are you searching for an accessible guide on how to create a blog application with PHP 5? Then this set of articles might be what you’ve been looking for! Welcome to the second part of the series “Building a Blogger with PHP.” In three parts, this series demonstrates in a few easy steps how to build a classic blog application in PHP 5 by following an object-oriented approach.
As I explained in the previous section, the next few lines will be entirely focused on showing how to create a new class method for displaying the respective online form where users can add new blog entries that will be shown on the application's main page.
Given that, here is the definition of this useful method, which I named "displayInsertForm()." Its signature is as follows:
In this case, the method listed above is simply tasked with rendering an input form which contains the typical boxes for entering basic blog data, such as the blog's title, author and content.
As you can see, there's nothing unexpected concerning the previous method, so let's move on and see another one. This method will be aimed at displaying the respective online form that allows the updating of a particular blog entry.
The topic sounds really interesting, right? Therefore, go ahead and jump into the following section. I'll be there, waiting for you.