5.3. Create a Script to Process the Form Input

Your entry form is set to submit entered values using the POST method to a file located at inc/update.inc.php. The next step is to create the file that will accept the input from the form and save entries to the database.

First, you need to create the inc folder. You create a folder for this script because it won't be accessed directly by a browser.

To keep our project organized, you can separate scripts that process information from scripts that display it. This makes maintenance a little easier because it groups similar files.

In your simple_blog project, create the inc folder, then create a file ...

Get PHP for Absolute Beginners now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.