October 2009
Beginner
408 pages
7h 27m
English
Saving the page association in your database when new entries are created requires that you modify your query in update.inc.php, as well as a couple more checks to ensure that errors don't occur.
To save the entry information, you need to:
Make sure the page was specified before processing
Add the page to the query to be saved
Sanitize the data
Use the sanitized page information to send the user back to the created entry
In update.inc.php, modify the script to include the lines highlighted in bold:
<?php
if($_SERVER['REQUEST_METHOD']=='POST'
&& $_POST['submit']=='Save Entry'
&& !empty($_POST['page']) && !empty($_POST['title']) && !empty($_POST['entry'])) { // Include database credentials and connect to the database ...Read now
Unlock full access