JQuery, AJAX, JSON, PHP, MySQL, MySQL

Comments Off on Interactive PHP Applications Using JQuery.AJAX and MySQL

Interactive PHP Applications Using JQuery.AJAX and MySQL

Using AJAX can be tricky and frustrating do to common pitfalls and misunderstandings about how it should be implemented. If this is your first experience with it then I hope you will find this post beneficial and I also hope that I provided adequate enough example and explanation that you won’t have to go on […]

MySQL

Comments Off on Prevent Hacking from Malicious SQL Injections by Parameterizing SQL Queries

Prevent Hacking from Malicious SQL Injections by Parameterizing SQL Queries

Malicious SQL Injection is a tactic used by hackers to try to insert “control characters” into queries issued over the Internet in an attempt to gain control over the database and issue commands to it. Using parameterization syntax can prevent hacker injection attacks on valuable web sites or other databases. To use the parameterized query, […]

Design Patterns and Techniques

Comments Off on Factory Method Pattern

Factory Method Pattern

The purpose of the Factory Method Design Pattern is to create objects without the general factory class having to know the exact class names. In this way a general factory can be used to create concrete factories which in turn create specific products. The Factory Method pattern separates the creator classes from the products they […]

Object Oriented PHP for Beginners

Comments Off on PHP Namespaces

PHP Namespaces

The PHP namespace is essentially a container that you can keep all of your classes and functions in as a way of preventing name collisions with other classes and methods that have the same name as those in your namespace. Large applications often have hundreds or thousands of components, which lead to a large number […]

PHP Callbacks

A callback is a function that is passed to another segment of code, service or process in order for that segment of code, service or process to call the function at some later point in time when a certain condition has been met. A typical use for a callback is handling information that is requested […]

Closures, Callbacks & Anonymous Functions

Comments Off on Lamda Functions

Lamda Functions

Lambda functions or “anonymous functions,” as they are often referred to, are simply throwaway functions that can be defined at any time and are typically bound to a variable. The functions themselves only exist in the scope of the variable of which they are defined, so when that variable goes out of scope, so does […]

Closures, Callbacks & Anonymous Functions

Comments Off on PHP Closures

PHP Closures

Closures are anonymous functions and are like lambda functions, but smarter in the sense that they have the ability to interact with variables from the outside environment of where the closure is defined. They are functions created without a name, and they are generally passes and callback handlers to other functions. Added in PHP 5.3, these […]