Cover Image

How to use the PHP ternary operator

When I learned how to use the ternary operator years ago, I fell in love with it. What a cool way to simplify assignments based on a condition. If you're not sure what the ternary operator is or how it works, you're missing out on a really cool piece of programming knowledge.

Cover Image

Sending Plain-text + HTML Emails in PHP

You can easily add some basic headers and send HTML emails using the PHP mail() function, but sometimes the resulting messages don't seem to display correctly in certain email clients -- especially those that don't support HTML emails.  The best thing to do is send both a plain-text version and an HTML version of your message in the same email.

Cover Image

Enabling TinyMCE's PHP Spell Checker

I've documented the steps that I've taken to successfully install and configure TinyMCE's PHP Spell Checker plugin to use the Google spell checker service. It's easier than you think, but there's not much in the documentation that clearly states the entire process, so here you go.

Cover Image

External Popup Links Using jQuery

With the deprecation of the target attribute in XHTML Strict, opening links in new windows has become a bit trivial, if not annoying, to standardize. I always look for a consistent, unobtrusive approach that degrades gracefully; and since I use jQuery quite frequently, this is how I usually handle them.

Cover Image

Getting Started with PayPal IPN and PHP

I was recently asked to integrate PayPal IPN into a website that sells online article subscriptions. Basically, the client wanted all users who signed up via PayPal to instantly have access to the website (as opposed to making them wait for someone to manually approve each transaction). The backend was coded in PHP and featured a MySQL database for storing users' information.

Cover Image

Creating Stylesheets for Handheld Devices

It's not uncommon so see someone surfing the net with their cell phone or PDA these days or, at least, trying to. Unfortunately, portable technologies still have a long way to go before they conquer the web with their tiny screens. The good news is that, with a little help from stylesheets, your website can look presentable even in the palm of somebody's hand!