Often it can be quite hard to debug SQL errors when using PHP since PHP will often throw a generic error that doesn't really help you diagnose the situation. Other times you may not want to allow PHP errors to be shown. A quick way to debug PDO SQL errors is to use the or…
In this tutorial I am going to go through all the basic SQL commands using PDO prepared statements. The use of prepared statements is 1 very simple way you can try and defend against SQL Injection. First thing you want to do is set up a connection to the database. The code for this is…
This will guide will show you what you need to do to install phpmyadmin on CentOS via command line. In order to install phpMyAdmin you need to add a repository that contains the download. You can add the repository by executing the following command. rpm -ivh http://ftp.jaist.ac.jp/pub/Linux/Fedora/epel/6/i386/epel-release-6-8.noarch.rpm Once the repository has been added you will…
This is quite a common issue that can be caused by a few different things, all of which are very simple to fix. If this is a fresh install then the first thing that you should check is your Apache conf file since this is likely the cause. Apaches conf file is usually located in…
There eventually comes a point where you are creating a large amount of posts and manually posting to Facebook is just too time consuming. It's very easy to automate the process of posting to Facebook using PHP. I would suggest you add a custom Facebook title field to your submit form that will allow you…
Upgrading to PHP 5.6 should be a quick and easy, but as most of us have experienced first hand, things don't always go smoothly. If you are doing this on a live web server then I suggest you put all your sites into maintenance mode before doing anything here. If you don't do this you…