查看文件: addr2.php
大小: 2.25 KB
类型: application/octet-stream
<?php require_once('../Connections/BE2.php'); ?> <?php $z0=''; $z1=''; $z2=''; $z3=''; $z0=isset($_POST['z4'])?$_POST['z4']:""; mysql_select_db($database_BE2, $BE2); $query_Rt1 = "SELECT distinct(z1) FROM zip2"; $Rt1 = mysql_query($query_Rt1, $BE2) or die(mysql_error()); $row_Rt1 = mysql_fetch_assoc($Rt1); $totalRows_Rt1 = mysql_num_rows($Rt1); if($z0<>''){ $query_Rtc = sprintf("SELECT * FROM zip2 where z0='%s'",$z0); $Rtc = mysql_query($query_Rtc, $BE2) or die(mysql_error()); $row_Rtc = mysql_fetch_assoc($Rtc); $totalRows_Rtc = mysql_num_rows($Rtc); if($row_Rtc['z2']<>""){ $z1=$row_Rtc['z1']; $z2=$row_Rtc['z2']; $z3=$row_Rtc['z3']; } mysql_free_result($Rtc); } ?> <div class="webform" align="center" > <table width="487" height="69" border="1" cellpadding="0" cellspacing="0" bordercolor="#0099CC" bgcolor="#FFFFFF"> <tr> <td width="475" align="center" valign="middle"><table width="510" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="80" nowrap="nowrap"><select name="wa1" id="wa1" onchange="setzipcode2()"> <option value="0" >=======</option> <?php do { ?> <option value="<?php echo $row_Rtz1['z1']?>" ><?php echo $row_Rtz1['z1'] ?></option> <?php } while ($row_Rtz1 = mysql_fetch_assoc($Rtz1)); ?> </select></td> <td width="34" nowrap="nowrap">縣市</td> <td width="37" nowrap="nowrap"><select name="wa2" id="wa2" onchange="setcityzone()"> <option value="<?php echo $row_Rt2['wa2']; ?>" selected="selected"><?php echo $row_Rt2['wa2']; ?></option> </select></td> <td width="68" nowrap="nowrap">鄉鎮市區</td> <td width="35" nowrap="nowrap"><input type="text" name="wa3" value="" size="5" /></td> <td width="17" nowrap="nowrap">段</td> <td width="21" nowrap="nowrap"><input type="text" name="wa4" value="" size="3" /></td> <td width="34" nowrap="nowrap">小段</td> <td width="21" nowrap="nowrap"><input type="text" name="wa5" value="" size="8" /></td> <td width="17" nowrap="nowrap">號</td> </tr> </table> </td> </tr> </table> </div> <?php mysql_free_result($Rt1); ?>
保存
取消
返回文件列表