Everything has gone very smoothly so far, visitors may view articles and navigate through the page successfully. Admins (created by an Admin on the CMS or in the MySQL schema) can log in, view articles, edit articles, view and edit users and delete articles.
My problem is that when articles are deleted, a next/previous button at the bottom (of any existing articles) with a function of
Code: Select all
<?php if ($id != 1) : ?>
<a href="article.php?id=<?php echo $id - 1; ?>">Previous Article</a>
<?php endif; ?>
I can manually reset the id to 0,1,2,3... etc. in the schema on phpmyadmin, but I'd like to apply some logic in order to make this system work flawlessly.
Many thanks for you help, if I get time I'll upload the CMS to my web server so that it can be viewed freely.
EDIT: a video can be viewed here: http://youtu.be/F8LU1jei3E4