in your database you would need to create a tax and shipping table.
I'll give an example for tax, but the same concept works for shipping:
taxes:
taxID - Primary Key
taxState - Text - 2 character state abbreviation, CA = California, TX= Texas, AZ= Arizona etc.
taxRate - number - this is the tax percentage, fore example 0.825
the checkout page will post the billing state to the confirm page.
On the confirm pate, create a recordset that will filter the taxState column on the state_province form element.
Then add a set session value server behavior. On the server behaviors panel, click the plus button and select eCart -> General -> Set Session Value.
Use Any Form Post for the trigger.
Use taxRate for the name
for the value, click the lightning bolt and select the taxRate column form the recordset. this will store the tax percentage in a session.
Now you need to create the tax rule.
On the tax tab of the eCart object add a new rule, set the trigger to If session Variable 'taxRate' exists.
set the calculation to Based on the Cart Subtotal:
Cart Subtotal 'times' '$_SESSION['taxRate']'