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).

https://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.

https://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.

https://www.zip2tax.com/Link/Lookup.asp?zip=90210&usr=sample&pwd=password&
ret=https://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>');

?>

Sample ZIP Code Range

In the sample ZIP code range (90001 - 90999), the following ZIP codes contain multiple tax rates; which can be used to test the return of multiple rows:

  • 90304
  • 90601
  • 90631
Terms of service: At Zip2Tax, your security and confidentiality are our highest priority. We will never share your e-mail address or any other personally identifiable information (PII) with any other person or company. Please review our full privacy policy. License: Please refer to our end user license agreement. Cancellation and Refund Policy: Please refer to our refund policy prior to purchase.
Copyright © 2006-2018 Zip2Tax, LLC. All rights reserved. Zip2Tax and Spot-On™ are trademarks of Zip2Tax, LLC, reg. pending U.S. Pat. & Tm. Off., S/N 86/613550 and 86/613547.

Quantcast
Quantcast
IP Address: 3.93.74.227
JavaScript: Fail
loggedd: none
WSFrank02/DBFrank02/CCProd

Don't have an account?

Sign up for a free trial here
If you do not have an account, please provide the information below.


Already have an account?
Free trial close Thank You!

Please check your email for your Username and Password.

If you do not receive your email shortly, check your SPAM folder for mail from "info@Zip2Tax.com" or call us at 1-866-492-8494, Monday - Friday 8am - 5pm EST.
Zip2Tax Password recovery close Password recovery

Please provide your registered email to verify and send password.



submit