Well, you could format it to see it properly, and so try:
$errors = "";
### contact the database and stuff in the new, eh....stuff
if($errors == "") {
db_connect();
### First update the table that holds all the information
$sql = "UPDATE orderentry SET
teamid='$teamid',
proofneedby='$proofneedby',
atexid='$atexid',
acctid='$acctid',
adtypeid='$adtypeid',
adcaption='$adcaption',
ponumber='$ponumber',
inches='$inches',
modularsize='$modularsize',
adlocid='$adlocid',
fullcolor='$fullcolor',
color1='$color1',
color2='$color2',
coloroverriderate='$coloroverriderate',
coloroverrideapprove='$coloroverrideapprove',
layoutherewith='$layoutherewith',
copytocome='$copytocome',
pickupwithcorrections='$pickupwithcorrections',
pickupwithchangenumber='$pickupwithchangenumber',
adsend='$adsend',
disc='$disc',
email='$email',
web='$web',
other='$other',
otherinfo='$otherinfo',
emailaddress='$emailaddress',
specposreq='$specposreq',
coupon='$coupon',
dbltruck='$dbltruck',
coop='$coop',
tears='$tears',
tearsno='$tearsno',
overrideapprove='$overrideapprove',
notes='$notes',
overrideadrate='$overrideadrate',
color1type='$color1type',
color2type='$color2type',
adcolumns='$adcolumns'
WHERE orderid='$orderidnumber'";
if (db_query($sql)) {
$sql = "INSERT INTO insertions (pubid,pubdate,orderno) VALUES('$pubid','$pubdate','$orderno')";
if (db_query($sql)) {
echo 'queries executed ok';
}
else {
exit(db_error());
}
}
else {
exit(db_error());
}
}
Where db_error() would be the function that outputs whatever error is returned (e.g. mysql_error() for mysql) and db_query() the database query function in PHP (e.g. mysql_query() for mysql)