?? userlist.php
字號:
<?php//echo getuserlist('aa',"hong") ;function getuserlist($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 user "; $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[UID]==$sel){ $tempstr .= "<option value='$row[UID]' selected='selected' > $row[UNAME] </option>";} else{$tempstr .= "<option value='$row[UID]' > $row[UNAME] </option>";}; };$tempstr .= "</select>";return $tempstr;}function getusername($uid) { $conn = phpmkr_db_connect(HOST, USER, PASS, DB, PORT); $sSql ="select * from user where UID= '$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[UNAME];return $tempstr;}?>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -