Moderation by MySql Database Primer Tutorial

Moderation by MySql Database Primer Tutorial

Moderation by MySql Database Primer Tutorial

Today’s the day we tackle some database “moderation” ideas. You will recall from yesterday’s Moderation by File Primer Tutorial as shown below, that “moderation” is associated with blogs and Content Management Systems and social media as a means by which uploaded content can be vetted, or not, during a “moderation phase” for a posting of some sort.

This can involve, in our eyes, quite a few options, none of which would not involve a server-side solution of some sort …

  • no moderation … even this needs a server side language, in our eyes, because you will be changing a server side webpage for all users
  • email (or sms or voicemail or any direct communication method) moderation … ask for an admin user of the website to change things after having emailed them … this is the one we showed two days back … and please feel free to try your own entries
  • moderate via a (web server) database with posting statuses such as “Awaiting Moderation”, “Published”, “To Be Deleted” … this is the one we show today … and, yet again, please feel free to try your own entries
  • moderate via a system of (web server) files with posting statuses such as “Awaiting Moderation”, “Published”, “To Be Deleted” … this is the one we showed yesterday … and, again, please feel free to try your own entries
  • only moderate to either of the four above after having gone through a CAPTCHA test that the user is not a robot

So today we are still here posing the idea that the “Things That We Have in Common” far outweigh the things that divide us, and present some ideas here. We offer, and encourage you to email us your ideas on the topic or use the file moderation method, and we’ll moderate them within 24 hours. With today’s file moderation method you are given the opportunity to login and “moderate” your own work but as you will recall from yesterday with …

The major lesson today, for us, is to show you the brilliance of phpMyAdmin as the administrator back-end to a MySql database. Some of the great features of phpMyAdmin we used to get to this point are …

  • phpMyAdmin’s great ability to export (to SQL, most usefully) the structure, in terms of “CREATE TABLE” type SQL and/or data of existant database tables as a useful way to help design your own new database tables
  • phpMyAdmin’s ease of use of the usual DML SQL functionality
  • phpMyAdmin’s ease of use of the usual DDL SQL functionality for the creation of users and the granting or denial of user priviledges, and drop and truncate functionalities

We still have the two basic web user roles going today. In this scenario, where we don’t ask anything of you (ie. no registration), except an email address, presumably, you can be thought of as a …

  • “guest” user … though in strict terms the word “guest” usually implies that there is a user registration involved … which we do not do here today … but to read a bit about this you could read PHP Membership Website Primer Tutorial … as distinct from …
  • the emailee of the “guest” user will be an “admin” user … one who can offer the means to moderate the uploaded data, and, as approved, write that data to a place where it will be picked up and included in the contents of the webpage(s) involved … hence the term “Content Management System”

… you, as a “guest” user will not succeed with this “admin” user login to “moderate”, but the mechanism is there for real “admin” users, as is a “get” parameter method like our “?admin=y” idea, with most blogs and CMS websites.

You will recall yesterday that ideas from PHP Membership Website Primer Tutorial came into play with the use of web server files and today its functionality is even more important with some MySql database work to follow up on phpMyAdmin database setup preparation. It screens “admin” users from the rest, ensuring you can write your fully functional database PHP free in the knowledge that the user is logged in as an “admin” user.

Here is the downloadable PHP code you could call moderation.php with its live run and changed from yesterday’s work this way.

Here is the login PHP code for the admin section you could call login.php with its admin user useful live run, unchanged from yesterday.

Here is the PHP code login(.php) uses to connect to the MySql database you could call db_connect.php unchanged from yesterday.

Here is the member PHP code that follows the login(.php) page you could call member.php that handles, so far, the “business logic” for file moderation as of yesterday and the admin user follow up to reading the email and approving the email moderation, of two days back, as well as today’s extended MySql database functionality, is changed from yesterday’s work this way.


Previous relevant Moderation by File Primer Tutorial is shown below.

Moderation by File Primer Tutorial

Moderation by File Primer Tutorial

We continue on with “moderation” ideas today, as with WordPress 4.1.1’s Moderation by File Primer Tutorial. You will recall from yesterday’s Moderation by Email Primer Tutorial as shown below, that “moderation” is associated with blogs and Content Management Systems and social media as a means by which uploaded content can be vetted, or not, during a “moderation phase” for a posting of some sort.

This can involve, in our eyes, quite a few options, none of which would not involve a server-side solution of some sort …

  • no moderation … even this needs a server side language, in our eyes, because you will be changing a server side webpage for all users
  • email (or sms or voicemail or any direct communication method) moderation … ask for an admin user of the website to change things after having emailed them … this is the one we showed yesterday … and please feel free to try your own entries
  • moderate via a (web server) database with posting statuses such as “Awaiting Moderation”, “Published”, “To Be Deleted”
  • moderate via a system of (web server) files with posting statuses such as “Awaiting Moderation”, “Published”, “To Be Deleted” … this is the one we show today … and, again, please feel free to try your own entries
  • only moderate to either of the four above after having gone through a CAPTCHA test that the user is not a robot

So today we continue to pose the idea that the “Things That We Have in Common” far outweigh the things that divide us, and present some ideas here. We offer, and encourage you to email us your ideas on the topic or use the file moderation method, and we’ll moderate them within 24 hours. With today’s file moderation method you are given the opportunity to login and “moderate” your own work but as you will recall from yesterday with …

This brings up the topic of web user roles. In this scenario, where we don’t ask anything of you, except an email address, presumably, you can be thought of as a …

  • “guest” user … though in strict terms the word “guest” usually implies that there is a user registration involved … which we do not do here today … but to read a bit about this you could read PHP Membership Website Primer Tutorial … as distinct from …
  • the emailee of the “guest” user will be an “admin” user … one who can offer the means to moderate the uploaded data, and, as approved, write that data to a place where it will be picked up and included in the contents of the webpage(s) involved … hence the term “Content Management System”

… you, as a “guest” user will not succeed with this “admin” user login to “moderate”, but the mechanism is there for real “admin” users, as is a “get” parameter method like our “?admin=y” idea, with most blogs and CMS websites.

The reason we didn’t need these PHP Membership Website Primer Tutorial ideas yesterday was that no web server files had to be written at that stage, but today they do, and we can’t let any “guest” user do it, so we find that MySql database work via the wonderful and enormously stupendous phpMyAdmin comes into play, and we’ll talk more about this tomorrow, when databases are used for all aspects of our final “moderation” via database discussion.

Here is the downloadable PHP code you could call moderation.php with its live run and changed from yesterday’s work this way.

Here is the login PHP code for the admin section you could call login.php with its admin user useful live run.

Here is the PHP code login(.php) uses to connect to the MySql database you could call db_connect.php

Here is the member PHP code that follows the login(.php) page you could call member.php that handles, so far, the “business logic” for file moderation and the admin user follow up to reading the email and approving the email moderation, of yesterday.


Previous relevant Moderation by Email Primer Tutorial is shown below.

Moderation by Email Primer Tutorial

Moderation by Email Primer Tutorial

The term “moderation” is associated with blogs and Content Management Systems and social media as a means by which uploaded content can be vetted, or not, during a “moderation phase” for a posting of some sort.

This can involve, in our eyes, quite a few options, none of which would not involve a server-side solution of some sort. We’ll think on this further (maybe Ajax?!), but some of the ideas for moderation would be …

  • no moderation … even this needs a server side language, in our eyes, because you will be changing a server side webpage for all users
  • email (or sms or voicemail or any direct communication method) moderation … ask for an admin user of the website to change things after having emailed them … this is the one we show today … and please feel free to try your own entries
  • moderate via a (web server) database with posting statuses such as “Awaiting Moderation”, “Published”, “To Be Deleted”
  • moderate via a system of (web server) files with posting statuses such as “Awaiting Moderation”, “Published”, “To Be Deleted”
  • only moderate to either of the four above after having gone through a CAPTCHA test that the user is not a robot

So today we pose the idea that the “Things That We Have in Common” far outweigh the things that divide us, and present some ideas here. We offer, and encourage you to email us your ideas on the topic, and we’ll moderate them within 24 hours. The mechanism, today, is via you, the user, sending us here, at RJM Programming, an email.

This brings up the topic of web user roles. In this scenario, where we don’t ask anything of you, except an email address, presumably, you can be thought of as a …

  • “guest” user … though in strict terms the word “guest” usually implies that there is a user registration involved … which we do not do here today … but to read a bit about this you could read PHP Membership Website Primer Tutorial … as distinct from …
  • the emailee of the “guest” user will be an “admin” user … one who can offer the means to moderate the uploaded data, and, as approved, write that data to a place where it will be picked up and included in the contents of the webpage(s) involved … hence the term “Content Management System”

… and so, in the scenario of “no moderation” “guest” users circumvent the moderation part of the “admin” user role and, in some automated (programming) way, with a language like PHP and a database like MySql, be able to get their uploaded content straight onto the webpage(s) of interest. So, sometimes you see “no moderation” but a CAPTCHA (robot) check, as the scenario of use.

Of interest, too, is the nature of the uploaded data. Is it “just text” or “can it contain images” or “can it contain videos” etcetera. Today, we are just allowing text.

Here is the downloadable PHP code you could call moderation.php with its live run.

If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.

This entry was posted in Database, eLearning, Tutorials and tagged , , , , , , , , , , , . Bookmark the permalink.

20 Responses to Moderation by MySql Database Primer Tutorial

  1. aromatherapy says:

    Thank you for this details that you’ve shared to us. It is extremely important to learn more about this. Also we can discuss this internet site of your to others to ensure that we can offer them valuable understanding that could be usage in our everyday regimen in our lives. Additionally thank you for those important remarks that you have here guys. Very appreciated.

  2. Definitely believe that which you said. Your favorite reason seemed to be on the internet the easiest thing to be aware of. I say to you, I certainly get irked while people think about worries that they plainly do not know about. You managed to hit the nail upon the top as well as defined out the whole thing without having side effect , people could take a signal. Will likely be back to get more. Thanks

  3. Suv says:

    Definitely, what a splendid site and informative posts, I will bookmark your site.Best Regards!

  4. Pet Supplies says:

    Simply desire to say your article is as astounding. The clarity in your post is simply excellent and i can assume you are an expert on this subject. Well with your permission let me to grab your feed to keep up to date with forthcoming post. Thanks a million and please continue the gratifying work.

  5. Hello, you used to write excellent, but the last few posts have been kinda boringΒ‘K I miss your tremendous writings. Past few posts are just a little bit out of track! come on!

  6. beauty blog says:

    topics as well as share it with us. I believe it will aid a great deal of some people. Thanks

  7. health news says:

    Thank you for the sensible critique. Me & my neighbor were just preparing to do a little research about this. We got a grab a book from our area library but I think I learned more clear from this post. I am very glad to see such fantastic information being shared freely out there.

  8. improvements says:

    Great tremendous issues here. I am very glad to peer your article. Thank you so much and i am having a look ahead to touch you. Will you please drop me a mail?

  9. Wonderful website. Plenty of helpful information here. I‘¦m sending it to a few pals ans additionally sharing in delicious. And of course, thank you in your sweat!

  10. Excellent post man, keep the nice work, just shared this with the friendz

  11. Plenty says:

    Liking the contribution.. thankyou Isn’t it amazing after you come across a superb article? So content to get identified this publish.. Unquestionably handy mindset, thanks for writing..

  12. Have you ever considered about adding a bit bit more than just your articles? I mean, what you say is fundamental and everything. Nevertheless consider in the event you added some great pictures or video clips to give your posts more, Ò€œpopÒ€! Your content is outstanding but with images and clips, this website could surely be among the most beneficial in its field. Amazing weblog!

  13. Divine says:

    Terrific feelings you’ve got here.. My personal internet browsings seem total.. thank you. My personal web surfing seem total.. thank you. indeed, analysis is having to pay off.

  14. I as well as my pals have already been checking the nice strategies on the blog while instantly came up with a horrible feeling I had not expressed respect to you for those tips. All the people are actually absolutely glad to read through them and have quite simply been loving these things. Thanks for indeed being simply thoughtful and also for obtaining this form of terrific areas millions of individuals are really desirous to understand about. My very own sincere apologies for not expressing gratitude to earlier.

  15. Satisfaction says:

    Take pleasure in the post you delivered.. Loving the article.. regards So pleased to possess discovered this submit.. My personal web browsings seem complete.. thank you.

  16. You made a few nice points there. I did a search on the matter and found mainly people will agree with your blog.

  17. Regards for this terrific post, I’m glad I discovered this site on yahoo.

  18. Needed to put you this very little note so as to say thanks a lot yet again with your extraordinary basics you have shared on this page. It was so particularly open-handed of people like you to offer without restraint just what a lot of folks would’ve offered as an e-book to get some dough on their own, especially now that you could have done it in the event you wanted. Those tactics in addition acted to provide a fantastic way to understand that other people have the same dreams like my own to figure out a whole lot more with respect to this issue. I am sure there are thousands of more pleasurable occasions ahead for those who read through your blog post.

  19. sbobet says:

    Thanks for finally talking about > Moderation by MySql Database Primer Tutorial | Robert James Metcalfe Blog < Loved it!

  20. amigurumi says:

    Very good information. Lucky me I discovered your blog by accident (stumbleupon). I have book-marked it for later!|

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>