Advertisement
PHP

Build a Custom CMS Using PHP and MySQLi

by

In this video tutorial, we'll be building a custom Content Management System (CMS) using PHP and MySQLi. We'll start off by pulling our content from a MySQL database and then build a CMS admin panel to manage our content. For easy content management, we will be using TinyMCE as our editor. I hope you enjoy the screencast.




Screencast Tutorial



Links


Conclusion

  1. So we started out with a simple HTML layout
  2. We put all our content in a MySQL database
  3. We pulled our content from the database into our website using some PHP
  4. We built a custom CMS with the help of TinyMCE to edit our content
  5. We made our CMS functional
  6. We are done! Congrats!

After Thoughts

I realized that in the preview at the beginning of the tutorial, the sidebar also had some user controls - including "Preview Website" and "Log Out". The code for that is below:

  
<?php 
echo "<h4>User Controls</h4>"; 
echo "<ul>"; 
	echo "<li><a href='index.php' target='_blank'>Preview Website</a></li>"; 
	echo "<li><a href='login.php?status=loggedout'>Log Out</a></li>"; 
echo "</ul>"; 
?>

Another configuration option for TinyMCE you might be interested in is:

  
content_css: "sources/styles.css"

Add that inside your TinyMCE configuration and set the value to your stylesheet. With that, all the HTML that gets loaded in the TinyMCE editor will use your stylesheet. SO if your background color is black, the editor will display a black background as opposed to the default, white. It's just an easier way for you to see and edit your content.

Related Posts
  • Web Design
    HTML/CSS
    Build a Top Bar Off-Canvas Navigation With Foundation 5Foundation menu
    Today, we are going to combine ZURB's Foundation 5 Off-Canvas feature with our top bar navigation. The result will be a nice custom navigation for desktop users and a sleek off -canvas menu for tablet and mobile users. Read More…
  • Code
    WordPress
    Mastering WordPress Meta Data: Working With LoopsMetadata
    In the first two parts of this series, we covered what meta data is in WordPress and how to work with the arrays that are typically returned. Now that you've learned to do the detective work necessary to find the structure of an array, it's time to learn to use loops to automate the process of outputting an array. Once you learn this important skill you will never have to write repetitive HTML markup again.Read More…
  • Web Design
    UX
    Walk Users Through Your Website With Bootstrap TourTour retina
    When you have a web application which requires some getting used to from your users, a walkthrough of the interface is in order. Creating a walkthrough directly on top of the interface makes things very clear, so that's what we're going to build, using Bootstrap Tour.Read More…
  • Code
    PHP
    Creating a Photo Tag Wall With Twilio Picture Messaging & PHPProcedural to oop php retina preview
    Twilio's recently announced Picture Messaging has vastly opened up what we can do with text messaging, now we can attach photos to our text messages and have them get used in different ways. In our case, we are going to build a Photo Tag Wall, which will contain photos linked to tags that will be displayed on a website.Read More…
  • Code
    Theme Development
    Creating a WordPress Theme From Static HTML: Creating Template FilesCreating wordpress theme from html 400
    In the first part of this series, I showed you how to prepare your HTML and CSS files for WordPress, ensuring the structure would work, the code was valid and that the correct classes were being used. In this tutorial you'll learn how to take your index.html file and split it up into a set of template files for use by WordPress.Read More…
  • Code
    PHP
    Authentication With Laravel 4Laravel 4 auth retina preview
    Authentication is required for virtually any type of web application. In this tutorial, I'd like to show you how you can go about creating a small authentication application using Laravel 4. We'll start from the very beginning by creating our Laravel app using composer, creating the database, loading in the Twitter Bootstrap, creating a main layout, registering users, logging in and out, and protecting routes using filters. We've got a lot of code to cover, so let's get started!Read More…