This is a work in progress. It uses jQuery to pass the values of the form to a PHP script which then uses GD to generate and return the appropriate image. You can download a zip file of the PHP and images that make this work by clicking here. You can read the original post that started it here.
*I know the colours are a little fugly but this is a work in progress.