Use elseif (http://uk.php.net/elseif) If action1 fails then error elseif action2 fails then error2 elseif . . . .endif Improved my life no end when I worked this out as an operating systems designer in S3 30 years ago! Keith -- Keith Underdown (Managing Director) The Q Consultancy Ltd KALIDO Information Archtectures Specialists +44 7798 934782 www.qconsultancy.co.uk