Advertisement
  1. Code
  2. PHP

Build a Custom CMS Using PHP and MySQLi

Scroll to top
Read Time: 1 min

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:

1
  
2
<?php 
3
echo "<h4>User Controls</h4>"; 
4
echo "<ul>"; 
5
	echo "<li><a href='index.php' target='_blank'>Preview Website</a></li>"; 
6
	echo "<li><a href='login.php?status=loggedout'>Log Out</a></li>"; 
7
echo "</ul>"; 
8
?>
9
Another configuration option for TinyMCE you might be interested in is:
10
  
11
content_css: "sources/styles.css"
12
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.
Advertisement
Did you find this post useful?
Want a weekly email summary?
Subscribe below and we’ll send you a weekly email summary of all new Code tutorials. Never miss out on learning about the next big thing.
Advertisement
Looking for something to help kick start your next project?
Envato Market has a range of items for sale to help get you started.