// author archive

Ed

Ed has written 22 posts for edrackham

Top 10 .htaccess Tips and Tricks

Custom Error Documents
Creating custom documents gives your site a more professional look, as not only are you providing a 'net' to catch unsuspecting visitors when they follow a bad link and such like, but they also allow you to customise the style of the page so you can maintain your basic site design by adding […]

Get Random Row with MySQL Without ORDER BY RAND()

This is an update to a previous post of mine which uses the RAND() method. Using the following code, you can retrieve a random row much, much faster (MySQL 4.1.x/5.0.x), with thanks to Jan Kneschke:

SELECT <COLUMN> FROM <TABLE> AS r1
JOIN (SELECT ROUND(
  RAND( ) * (
    SELECT MAX( id ) FROM <TABLE>)
  ) AS […]

Standards Compliant Internet Explorer (IE8)

We’ve decided that IE8 will, by default, interpret web content in the most standards compliant way it can. This decision is a change from what we’ve posted previously.
Don your glad rags and party hats, it's time to celebrate! Microsoft have announced that their new interoperable release of Internet Explorer (IE8) will be standards compliant by […]

Guilt Trip Album Release Gig

Wow. This was definately a gig to remember! I've seen these guys a few times, but the amount of effort they've put into the release of their album has been phenomenal. The energy on stage was amazing, the music was spot on and everyone in the venue were on their feet.
I really hope these guys […]

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 […]

Moving House!

Wooo! Well I'll be moving house on Tues 12th Feb, right before my birthday too!
Not that there have been lots of posts recently, but just so you know that there won't be many over the next week or so.

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 […]

Beginner's Mod_Rewrite Tutorial

Have you seen those websites such as Digg and SVP that use fancy URLs such as http://domain.com/page_content? Yeah, sure this could be nearly achieved by simply renaming your pages to something like page_content.htm - but that would result in you having to change every page on your site to a suitably written filename, as well […]

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 […]

Recent Comments