Hi Dave
Thanks for that my fault for assumming that by typeing action it would add it as $_GET['action'].
I did find though that it still messed up a couple of opening and closing or the <?php ?> tags but once I corrected those all works really well.
Thanks again for your help.
Mike