<?php

$cap_option = "";
require 'set/db_connect.php';
$str_sql = "SELECT * FROM `capital_master` ORDER BY `id` ASC;";
$cap_rs = mysql_query($str_sql,$db);
$cap_i =1;
while($cap_data = mysql_fetch_assoc($cap_rs)){
    foreach($cap_data as $keys){
        $op_cap_i['id'][$cap_i]   = $cap_data['id'];
        $op_cap_i['cap'][$cap_i]   = $cap_data['cap'];
        $op_cap[$cap_i]['id']   = $cap_data['id'];
        $op_cap[$cap_i]['cap']   = $cap_data['cap'];
    }
    $cap_i++;
}

switch($address_option_flg){
    case 1;
        $cap_name = $op_cap_i['cap']["{$select_capital}"];
    break;
    case 2:
        $cap_option .= "<option value='0'>選択してください</option>\n";
        foreach($op_cap as $cap_key){
            $cap_option .= "<option value='{$cap_key['id']}'>{$cap_key['cap']}</option>\n";  
        }
    break;
}
?>
