📄 add2.php
字号:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 3.0">
<title>增加内容</title>
<style type="text/css">
BODY { color: #0000ff; FONT-FAMILY: "宋体"; FONT-SIZE: 12pt }
a:link { color: #D033ff; FONT-FAMILY: "宋体"; FONT-SIZE: 9pt; text-decoration: none}
a:hover { color: #0000ff; FONT-FAMILY: "宋体"; FONT-SIZE: 9pt; text-decoration: none}
a:visited { color: #D033FF; FONT-FAMILY: "宋体"; FONT-SIZE: 9pt; text-decoration: none}
</style>
</head>
<body background="bg.gif">
<?
include("header.inc");
$query=mysql_query("select sm from wenxue1 where smxlh='$smxlh'");
$array=mysql_fetch_row($query);
echo '<h1 align="center"><font color="#8000FF">增加 <font color="#D03300">'.$array[0].'</font> 内容</font></h1>';
echo '<form method="POST" action="add2.php?smxlh='.$smxlh.'">';
?>
<p>章节或标题:<input type="text" name="bt1" size="20"><br>
内容:<textarea rows="14" name="nr1" cols="80" style="FONT-FAMILY: 宋体;"></textarea><br>
<input type="submit" value="提交" name="submit"></p>
</form>
<p align="center"><img src="lygzs.gif" width="143" height="22"
alt="lygzs.gif (3234 字节)"></p>
</body>
<?
if ($submit)
{
$nr1=trim($nr1);
if ($nr1=="")
{
echo "<font color='yellow'>数据空,增加失败</font>";
} else {
#$nr1=strip_tags($nr1);
$nr1=nl2br($nr1);
$nr2=explode('<br>',$nr1);
$nr2[0]=" ".$nr2[0];
$nr="";
$nn=chr(13).chr(10);
while($ok=each($nr2)){
$ok1=substr($ok[1],1,2);
if ($ok1==" "|$ok1==" "){
if ($ok1==" "){
$nr=$nr.$nn.' ';
} else {
$nr=$nr.$nn;
}
}
$ok1=ltrim($ok[1]);
$nr=$nr.$ok1;
}
mysql_query("insert into wenxue values('$bt1','$nr','$smxlh',curdate(),curtime())");
echo "<font color='Blue'>".$array[0]."增加成功</font>";
}
}
?>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -