📄 modi2.php
字号:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 3.0">
<title>修改书名</title>
</head>
<body background="bg.gif">
<h2 align="center"><font color="#8000FF">修改书名</font></h2>
<?
include("header.inc");
echo '<form method="POST" action="modi2.php?smxlh='.$smxlh.'">';
$query=mysql_query("select sm,zz,lx from wenxue1 where smxlh='$smxlh'");
$array=mysql_fetch_row($query);
$lx1=$array[2];
echo '<p>书名:<input type="text" name="sm1" size="20" value="'.$array[0].'"><br>';
echo '作者:<input type="text" name="zz1" size="20" value="'.$array[1].'"><br>';
echo '类型:<select name="lx1" size="1">';
$query=mysql_query("select * from wenxue2");
while ($array=mysql_fetch_row($query)){
if ($lx1==$array[1])
{
echo '<option selected value="'.$array[1].'">'.$array[0].'</option>';
}
echo '<option value="'.$array[1].'">'.$array[0].'</option>';
}
?>
</select><br><input type="submit" value="修改" name="submit1"></p>
</form>
</body>
<?
if ($submit1)
{
$sm=trim($sm);
if ($sm=="")
{
echo "<font color='yellow'>数据空,修改失败</font>";
} else {
mysql_query("update wenxue1 set sm='$sm1',zz='$zz1',lx='$lx1' where smxlh='$smxlh'");
echo "<font color='Blue'>书名修改成功</font>";
}
}
?>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -