fupaylist.php
资源名称:minierp.rar [点击查看]
上传用户:yantgcom
上传日期:2013-07-19
资源大小:478k
文件大小:1k
源码类别:
MySQL数据库
开发平台:
PHP
- <?php
- //echo getfupaylist('aa',"01") ;
- //echo getfupayname("02") ;
- function getfupaylist($fname,$sel) {
- //include ("../inc/db.php");
- //include ("../inc/phpmkrfn.php");
- $tempstr="<select name='$fname'>";
- $conn = phpmkr_db_connect(HOST, USER, PASS, DB, PORT);
- $sSql ="select * from fupay ";
- $rs = phpmkr_query($sSql,$conn) or die("Failed to execute query: " . phpmkr_error() . '<br>SQL: ' . $sSql);
- while ($row = mysql_fetch_array($rs, MYSQL_ASSOC)) {
- if ($row[FUP01]==$sel){ $tempstr .= "<option value='$row[FUP01]' selected='selected' > $row[FUP02] </option>";}
- else{$tempstr .= "<option value='$row[FUP01]' > $row[FUP02] </option>";};
- };
- $tempstr .= "</select>";
- return $tempstr;
- }
- function getfupayname($uid) {
- $conn = phpmkr_db_connect(HOST, USER, PASS, DB, PORT);
- $sSql ="select * from fupay where FUP01= '$uid' ";
- $rs = phpmkr_query($sSql,$conn) or die("Failed to execute query: " . phpmkr_error() . '<br>SQL: ' . $sSql);
- $row = mysql_fetch_array($rs, MYSQL_ASSOC);
- $tempstr =$row[FUP02];
- return $tempstr;
- }
- ?>