1) Don't edit the code directly. use the eCart object editor to make these changes.
2) Think about variable scope.
a recordset variable will only be available if the recordset is on every page. like i said in my previous reply:
same holds true for the tax. you should be storing the tax rate from the recordset into a session variable.
then in the eCart object, exit the tax rule and add a new trigger:
If Session Variable 'Tax' exists.
in the calculation, use:
Taxable Total 'times' '$_SESSION['tax']'