rudy and paul cowan: thank you for (a) educating me and (b) cutting my code down by 2 db queries and about 100 lines of code <tip type="SQL joins"> Needing to do multiple queries for one final output? There is a good change that one query with a join can do the smae thing. A reasonable introductory article can be found here: http://www.devshed.com/Server_Side/MySQL/SQLJoins/page1.html </tip> -- ------------------------------ Paul Bennett Internet Developer Teltest Electronic Design ------------------------------ Email: paul at teltest.com Phone: 64 4 237 4557 Web: http://www.teltest.com Wap: http://wap.teltest.com