![]() |
|||
| PHP Active Record (In Progress) We have heard a lot of about the use of the Active Record paradigm in Ruby on Rails. Lets see how we can use the same approach in PHP and what benifits it can offer. Object Oriented Forms (In Progress) Forms are probably the most common type of code that PHP Developers have to write. They are tedious and very repetitive. They usually have similar requirements; Building the form, validating the form, and processing the form. All of these aspects make forms the perfect candidate for code resuse. In this article we will create an Object Oriented approach to Form. Afterwhich, you will probably never look back. Sections: Introduction, Source Code, Base Classes, Validators, Fields Random Functions (In Progress) This article includes a list of Random functions that I have created while helping people in forums around the internet. Sections: Round to Closest Nickel, Seconds to Words Single Signon Integration One of the biggest hassles on the web is having to continuously register at thousands of websites. Wouldn’t it be great, if you could use the same username and password on all of the websites you visit and didn’t have to fill out the registration form and verify your e-mail address again for the 1000th time. This article describes one such system that will allow web developers to integrate with a “Single Signon” system to save their users the hassles that we just talked about. Sections: Introduction, How it Works, Registering with V-ID, Validation, Source Code Datagrids Creating Data grids is one of the most common tasks for web developers. It is often necessary to query data from various sources (e.g. databases) and display the data in a tabular format. More often then not, this process is very tedious and developers run into the problem of having to maintain a similar look for all tables on the website. In this article, we will look into creating a Data-Bound Grid using PHP. This Grid will allow us to use data from any source and to maintain a consistent look across the entire site. Sections: Introduction, Data Adapters, Renderers, DataGrid, Sample Usage, Source Code Advanced Database Interaction As mentioned before, PHP is a very lenient language. While is some cases, this leniency can be advantageous, in others, it can present significant problems. One of these problems arises with the need to prevent SQL Injection. Since PHP is losely typed, no errors are thrown if you attempt to use a string as an integer for example. This article provides one solution on how to overcome this downside and create an 00 Abstraction layer with built in SQL Injection Protection. Sections: Introduction, ResultSet, SQLException, Connection, Statement, Sample Usage, Source Code Debugging PHP Code Debugging any software application can be a hassle. Most of us may still be using the time honored technique of inserting print statements after every other line of code to determine where the problem happened. But for a second, lets look past that technique and to simplify our work. Sections: Debugging PHP Code, Source Code PHP Variable Usage PHP is a very loose language. Meaning, that you don't have to declare your variables before hand. While this can be a very useful feature, it can also be cause for a lot of headache. Lets take a look at how we can centralize, and simplify our variable usage. |
|||
| This website is authored and maintained by Khurram Khan. Khurram Khan has 5 years of experience in developing Enterprise level applications using PHP / MySQL / Linux and related technologies. Most code discussed on this site requires PHP5. All code discussed on this site is made available under the GPL License. | |||