I'm using 4.0.9. In your second step, the code doesn't match up and I'm not sure how to change it. Could anyone take a stab? This is my code:
Code:
db_query("update $sql_tbl[orders] set tracking='$tracking', notes='$notes' $details where orderid='$orderid'");