thats done it thanks Ray.
Now, on the pp_confirm page I have added
$ReplaceQuery->bindColumn("DetailColour", "s", "".$EquicraftShopping->DisplayInfo("Colour") ."", "WA_DEFAULT");
(line 202 of the attached)
for some reason this line is making the order information aded to the orderdetails table fine but not into the orders table (and it gives an order ID of 3 rather than 507 which is the next OrderID.
am not sure why this would be happening and have tried to track it down in all the attached..