I recently had a situation with a client where I needed to use an iframe to pull content from a bulletin board into their main site template. Setting up the iframe was the easy part, then I noticed that the content would auto size the width, but it would not autosize the height. As I
PHP: Email Validation
There are an overwhelming number of regex sequences out there to validate an email address against, and frankly I get tired of running through them all trying to find one that fits my situation. I went looking for one that most closely follows the IETF rules and lo and behold I find a document describing
PHP + MySQL: Checking to see if a record exists in the database
Quite often I need to look into the database to see if a record exists. For example, to check if a username already exists when creating a new user. I created a simple function to do this for me with mysqli. All I have to do is pass it the table name to look in,
PHP: Using a Registry
Over that last dozen or so projects I have worked on I have noticed that files containing settings, and other site specific data, tend to grow pretty quickly. Each time I open a settings file I struggle with the thought, ‘Do I use a define or a global variable?’. I do not really like using
PHP: Find and manipulate the data between delimiters
I am currently working on a site where the client has a rich text box to enter content for his articles. This is not unusual in itself, however he wants the ability to do some wikiish syntax in the text box and have the system magically produce the output for him. For instance, \[\[ThisIsSomePage\]\] could