Blog > PHP

How to Show Only One Decimal Place for a Number in PHP Without Rounding Up

This is one way to display a number in PHP without rounding up.  number_format() would round the number up, so I've used substr() to simply 'hide' the extra decimal places. &l...read more

VirtualMerchant XML Error: 6042Invalid Request FormatXML request is not well-formed or request is incomplete.

The XML example code in the VirtualMerchant developer guide is incorrect. They accidentally added an additional tag at the end of the code which results in the following error: 6042Invalid Req...read more

HTTP 1.1 PayPal IPN Example PHP Code

PayPal recently announced that they're going to "discontinue support for HTTP 1.0 protocol starting February 1, 2013."  Today I ran into some problems implementing these changes.  ...read more

Sending Email with Amazon SES SMTP and PHPMailer

We use Amazon SES to send email from some of our clients' web applications.  Recently, we developed a web application for a company who wanted to host the app on their own server.  In this c...read more

How to Upload Multiple Files in a Web Application with Progress Bar, Multiple Fields and Form Validation Using jQuery, PHP & Uploadify

There are a few tutorials out there on how to use Uploadify to upload files in a web application. However, I haven't found one that integrates Uploadify into a form with other fields, so that the fo...read more

Tutorial: Import a CSV File Using PHP and MySQL

The following code should help beginner PHP/MySQL developers who are looking for an easy way to import a CSV or comma delimited file into a mysql database.  This example adds new contacts into th...read more

Tutorial: PHP Photo Gallery With No Database

The purpose of this tutorial is to help beginner PHP developers understand some basic PHP concepts and functions by building a simple photo gallery script. This photo gallery does not require a mysql...read more

Tutorial: Instant Search With Arrow Key Navigation Using jQuery and PHP

Using jQuery and PHP you can develop your own 'Google-like' instant search. This demo lets you see 'instant' results while searching our blog. //arrow key navigation $(document).keydown(f...read more

Simple jQuery Form With Validation and Without Page Refresh

The overall purpose of this script is to: Post a form without refreshing the page Easily validate the form Show confirmation message Do #1-3 within a single file and with as litt...read more

How to Write a URL Shortener Script with PHP

A URL shortener is a useful script to develop and it's pretty easy if you're familiar with PHP. URL shorteners are being used more now than ever because people need to post short links on Twitter. L...read more

How to Use MySQL's AES_ENCRYPT and AES_DECRYPT to Store Information in a Database

  UPDATE (March 2013) - Here's a better solution to storing passwords in a database using PHP/MySQL.   This mini-tutorial assumes you already know how to connect to your dat...read more

A Better PHP Upload Progress Bar Using jQuery

Hopefully, this example of a PHP file upload progress bar will be helpful to PHP  developers who are looking for a simple way to display a file upload progress bar into their online forms and web...read more

SPAM Protection Using PHP and jQuery

The most common solution to keep 'machines/automated spammers' from abusing PHP forms is to use a CAPTCHA. This works, for the most part, but is very inconvenient & usually unsightly for the visi...read more

Find the Last Day of the Month With PHP

Google - last day of month php - and you'll get over 15,000,000 results.  It's amazing how many people have searched for this & how many roundabout ways there are to accomplish what should be...read more

Merge Multiple PDF Files with PHP

This tutorial explains how to successfully merge multiple PDF files using pdftk and PHP. A recent project of ours required this functionality, and we hope this tutorial saves you some time. View D...read more

A Useful PHP File Upload Progress Meter

UPDATE - Click here for a new (better) PHP Upload Progress Bar Script If you're like me, you want a PHP upload progress meter that is actually useful in your web applications. All of the uploa...read more