PHP Tutorials

Connect to an LDAP server with PHP
September 22nd, 2011

This is just a small function that I wrote to connect to an LDAP server.  It will connect to one server but will take multiple domains within that server as arguments.  It parses the results and outputs three very common fields (firstname, lastname, and email address).  The code is pretty well documented, so I’ll just leave it at that. Keep reading »

The Loop

WordPress Loop – advanced relations in posts
September 9th, 2011

Plugins used for this post: advanced-custom-fields

Before I really get into this article, I want to say that WordPress is the best CMS available. Not only is it free and open source, but it is supported by the largest community of developers in the world.  Every day something better comes out for WordPress that jettisons it farther ahead of the competition. With that said, today’s topic is using the loop in WordPress to create relationships between posts.

With the advances in custom-post-types and custom-fields in WordPress 3.0, your content can now be taken to the next level.  A project I was working on today created the need for me to relate posts to pages.  You say, “That’s easy. That’s what tags and categories are for.” This is true.  Tags and categories were created to allow you to sort your collection of data by its content.  However, what if you wanted to show a group of posts on a page based on the content in the page? Let me give an example. Keep reading »

PHP Lesson 1 – An Introduction
June 10th, 2010

PHP is an open source server-side scripting language. It has become very popular in recent years because of its versatility and because it’s very easy to learn.  You can be writing PHP scripts 5 minutes after you are introduced to the language. As I said, it is a server-side scripting language.  This means that anything you write in PHP code will not be Keep reading »