<?php
/*
  $Id: Address_details.php,v 1.3 2003/09/29 01:13:22 anotherlango Exp $

  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2003 osCommerce

  Released under the GNU General Public License
*/
  require('includes/application_top.php');
//ajax start
$command=isset($HTTP_GET_VARS['command']) ? $HTTP_GET_VARS['command'] : '';
$country=isset($HTTP_GET_VARS['country_id']) ? $HTTP_GET_VARS['country_id'] : '';
$flag=isset($HTTP_GET_VARS['flag'])?$HTTP_GET_VARS['flag']:'';
		if($command=='show_state'){
			 	$zone_ids="";
			 	$zone_name="";
		      $zones_query = tep_db_query("select zone_id,zone_name from " . TABLE_ZONES . " where zone_country_id = '" . tep_db_input($country) . "' order by zone_name");
		      while ($zones_values = tep_db_fetch_array($zones_query)) {
		         $zone_ids.=$zones_values['zone_id'].",";
		         $zone_name.=$zones_values['zone_name'].",";
		      }
		   echo $HTTP_GET_VARS['flag'].substr($zone_ids,0,-1)."^".substr($zone_name,0,-1)."^".$zone;     
		   exit;
		}   
 //ajax end

 
 ?>