Archive for 'PHP'

Creating a Custom WordPress Shortcode

Creating your own WordPress shortcodes is a nifty way to build dynamic elements into your website without relying on 3rd party developers or plugins. This tutorial offers a beginner’s guide to creating your first WordPress plugin which will be referenced by a custom shortcode. In this example we’ll be creating a basic random quote generator [...]

Protecting Multiple Files with Secure Sessions

If you’ve got more than one file – such as a script control panel – that you want protecting, my Secure Login Page is more hassle than is needed to get an adequate level of protection. Using a similiar no-database concept though, we can make use of sessions to help protect our files. Firstly, we [...]

Creating a PHP Styleswitcher

One of the benefits of creating a CSS-rich website is that you can change how the website looks completely, simply by creating a new stylesheet. This means that you can skin your CSS-based website using multiple stylesheets, instead of the old route of creating separate header and footer include files. Once you’ve created your stylesheets [...]

PHP Mail Form: Secure and Protected

The one major downside to the ever-changing fast paced cyber world that we call the Internet is the speed at which code becomes outdated and new security issues are discovered. This tutorial covers the basics as set forth in previous tutorialtastic mail form guides with new, more advanced security techniques and spam-blocking measures. Firstly, the [...]

Creating an Error Reporter

This tutorial will guide you through creating a form that allows people to report errors (typos etc) they find on your website (as previously seen on jemjabella.co.uk). The first step is to create the actual form. We need three fields: page URL, error and correction. This allows visitors to pinpoint exactly where and what the [...]

Securing Your Passwords

Most people have their MySQL connection strings and other important data in a config/functions file in the main public_html directory. One badly set permission, or even a server glitch, can cause this file to become exposed leaving it vulnerable to direct attack via URL. The solution? Ensure the file cannot be accessed via URL by [...]