Zip2Tax Logo

Developers Information

Passing Request Variables

Quick Link

The simpliest form of this method is to click on the link below (use the browser's back button to return to here).

http://www.zip2tax.com/Link/Lookup.asp?zip=90210&usr=sample&pwd=password

Or you can paste this line of code into any browser's URL box.

You will see that you looked up the data using the request variables. You may wish to try other zip codes to see the results. Keep in mind that when experimenting with the sample username and password combination you are only allowed zip codes between 90001 and 92999. When you become a subscriber to our service you can use the exact same code only having to replace the username and password with your own.

This example shows our basic version of tax information giving you the total rate. You may require our full breakout information which returns all the components (State, County, City and Special District) of the total. By clicking the link below you can view this.

http://www.zip2tax.com/Link/Lookup_Extended.asp?zip=90210&usr=sample&pwd=password

Return the Results to your custom page

Now we want to have the results passed back to us in a page we custom designed. At the end of the URL we are going to add a request variable named ret as shown.

http://www.zip2tax.com/Link/Lookup.asp?zip=90210&usr=sample&pwd=password&ret=http://www.Zip2Tax.com/Link/DisplayResults.asp

Instead of displaying the results directly to the browser as in the Quick Link example, the data is being passed to a page of your choosing which is displaying the data. This new page should reside on your server and can be written in any language. Below are samples using ASP and PHP.

Display Request Variable Results Using ASP
This is a separate asp page.<br><br>

Zip_Code: <%=Request("Zip_Code")%><br>
Sales_Tax_Rate: <%=Request("Sales_Tax_Rate")%><br>
Post_Office_City: <%=Request("Post_Office_City")%><br>
County: <%=Request("County")%><br>
State: <%=Request("State")%><br>
Shipping_Taxable: <%=Request("Shipping_Taxable")%><br>


Display Request Variable Results Using PHP
<?php

echo('This is a separate php page.<br><br>');

echo('Zip_Code: ');
echo($_REQUEST['Zip_Code'].'<br>');

echo('Sales_Tax_Rate: ');
echo($_REQUEST['Sales_Tax_Rate'].'<br>');

echo('Post_Office_City: ');
echo($_REQUEST['Post_Office_City'].'<br>');

echo('County: ');
echo($_REQUEST['County'].'<br>');

echo('State: ');
echo($_REQUEST['State'].'<br>');

echo('Shipping_Taxable: ');
echo($_REQUEST['Shipping_Taxable'].'<br>');

?>

Login

User Name:
Password:
  Submit

Do not log in if you wish to use the free trial lookups. Simply enter a ZIP code in the box below.

Having trouble? Call 1-866-492-8494 for help.

Look Up The Tax

Zip Code:
  Lookup

Try it for FREE. Enter a ZIP code to get the sales tax rate. 50 Free Lookups (Max. 10 per day)