Category Archives: Web Development
Effective Use of PHP Namespaces for Better Code Organization
Introduction PHP namespaces are a powerful tool for organizing code and reducing conflicts between classes with the same name. In this article, we will explore the benefits of using PHP namespaces and provide tips on how to use them effectively. …
Best Practices for Secure PHP Development
Introduction PHP development has become an essential part of web development, and as the technology advances, security becomes a major concern. In this article, we will discuss some best practices for secure PHP development. 1. Input Validation Input validation is …
Apache server domain redirection: .config vs .htaccess
There are a few ways to redirect from “Domain A” to “Domain B”. If you do not care about tracking analytics for “Number of Hits” to “Domain A”, the cleanest approach would be to define the redirect in your apache …
Simple JQuery hover effect
Here is a simple hover effect you can implement with JQuery. I use this trick occasionally when I want to give buttons or images a hover effect, but don’t want to spend the time creating alternate versions of each image, …
Development with the Canada Post shipping API
If you are developing a shopping cart and require real time shipping estimates via Canada Post, they provide an excellent and simple API you can use via CURL. The first step to using the API is to contact Canada Post …
Very simple Captcha function for forms
There are tonnes of bot scripts floating around the web these days, causing form hell for website administrators who have to sort through the spam hell. One solution to the problem is the use of Captcha codes on web forms. …
Simulated CSV File Download in PHP
One of the most often requested features in websites dealing with accumulating data is a method of exporting it. CSV format is an excellent choice for most situations, since it is extremely easy to generate, and Microsoft XL is so …
Using Templates with PHP
Using templates in PHP can make complex tasks easier. The template is the basic layout of your document. It contains placeholders for snippets of data that can be swapped into the template. Here is some code to generate a sample …