// archives

PHP

This category contains posts

PHP Date Picker

This is a simple to use script that can be called at anytime to insert a date picker into your form.
Example
Your browser does not support IFRAMES. Please view the date picker at http://edrackham.com/tutorials/php-date-picker/
Usage
Just make a call to

echo DatePicker();

wherever you want the date picker to show. If you want to use it multiple times, just […]

Get Random Row with MySQL

UPDATE: Please see my newer atricle on how to retrieve a random row, faster, without RAND().

This post assumes you know how to create and use a connection to a MySQL database in PHP and have a table named 'quotes' as shown below. In this post, I will aim to teach you how to use PHP […]

PHP Class Tutorial

I’m not sure how to start this one… It can be quite difficult to understand PHP classes at first, but hopefully I’ll make everything seem easy! Let's just get stuck in shall we…
Brief overview…
Ok so you’re actually reading this brief overview? You must be serious…
PHP classes can be used to group together a set of […]

What Beautiful PHP & AJAX Looks Like

I recently saw an image demonstrating What Beautiful HTML Looks Like. I've decided to do my own What Beautiful PHP and AJAX Looks Like image. You can also play with the actual application that this image demonstrates if you so wish!

The Source
This example makes use of the Prototype JavaScript library. I'm using this, as it […]

Basic PHP Tutorial

Ok, so how do you load a .php file into your web browser, and what does it do when you type (for example) http://www.edrackham.com/index.php then hit enter?

The web browser requests the document with the .php extension from the edrackham.com server.
The webserver kicks in and says "Hey! Someone wants a PHP file. Something else needs to […]

Get Days Between Two Dates Using PHP

This is a simple snippet of code that will return an array of days between two dates.
Read on for a little more info…

Formatting dates in PHP

Ok, so how do you format dates in PHP so it outputs the date format you want? Well thanks to PHP’s date() and strtotime() function, we can do all that! To kick off, lets take the most common date format ‘YYYY-MM-DD HH:II:SS‘. This date format seems to be most favoured as it increments in such […]

Most Emailed