【php开源代码栏目提醒】:网学会员在php开源代码频道为大家收集整理了add_depart.php提供大家参考,希望对大家有所帮助!
<?php
session_start();
include "../inc/chec.php";
include "../conn/conn.php";
$sqlstr = "select * from tb_depart";
$result1 = mysql_query($sqlstr,$conn);
?>
<script src="../js/admin_js.js"></script>
<link href="../css/style.css" rel="stylesheet">
<table width="765" height="450" border="0" cellpadding="0" cellspacing="0" style="border: 1px solid #9CBED6; margin-top:15px;">
<tr>
<td align="center" valign="middle">
<form name="a_depart" id="a_depart" method="post" action="add_depart_chk.php">
<table width="412" height="192" border="0" cellpadding="0" cellspacing="0">
<tr>
<th colspan="3" align="center" valign="middle" scope="col">部门名称:
<input name="d_name" type="text" id="d_name" size="20"></th>
</tr>
<tr>
<td colspan="3" align="center" valign="middle">上级部门:
<select name="u_id">
<option value="0" selected="selected">无</option>
<?php
while($rows = mysql_fetch_row($result1)){
echo "<option value='".$rows[0]."'>".$rows[1]."</option>";
}
?>
</select></td>
</tr>
<tr>
<td width="80" height="105" align="right" valign="middle">备注:</td>
<td colspan="2"><textarea name="remark" cols="40" rows="5" id="remark"></textarea></td>
</tr>
<tr>
<td colspan="3" align="center" valign="middle"><input type="submit" name="Submit" value="添加" onclick="return a_check();"></td>
</tr>
</table>
</form>
</td>
</tr>
</table>
上一篇:
add_chk.php
下一篇:
浮生若萍