文章发布系统
后台管理系统-》
1, 文章管理列表
2, 文章发布程序
3, 文章修改程序
4, 文章删除程序
前台展示系统-》
1. 文章列表
2. 文章内容页
文章发布系统数据库-》
上面的代码写入connect.php文件中
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
l Config.php
<?php
define(‘HOST’,’127.0.0.1’);
define(‘USERNAME’,’root’);
define(‘PASSWORD’,’123’);
?>
l Connect.php
<?php
Require_once(‘config.php’);
//连库
If(!($con= musql_connect(HOST, USERNAME, PASSWORD))){
echomysql_error();
};
//选库
If(!(Mysql_select_db(‘info’))){
echomysql_error();
};
//字符集
If(Mysql_query(‘set names utf8’)){
echomysql_error();
};
?>
l article.add.php
<!DOCTYPEhtml>
<html>
<head>
<metacharset=”utf-8”/>
<title>文章添加前台界面</title>
<styletype=”text/css”>
body{
margin:0;
}
</style>
</head>
<body>
<td>
<p><ahref=”article.add.php”>发布文章</a></p>
<p><ahref=”article.manager.php”>管理文章</a></p>
<ahref=”article.add.php></a></td>”
<form id=”form1” name=”form1” method=”post”acticle.add.handle.php”>
<tablewidth=”779” border=”0” cellpadding=”8” cellacing=”1” >
<tr>
<tdcolspan=”2” align=”center”>发布文章</td>
</tr>
<tr>
<tdwidth=”119”>标题</td>
<tdwidth=”625”><label for=”title”></label>
<inputtype=”text” name=”title” id=”title”>
</td>
</tr>
<tr>
<td>简介</td>
<td>
<labelfor=”description”></label>
<textareaname=”description” id=”description”cols=”60” rows=”5”></textarea>
</td>
</tr>
<tr>
<td>内容</td>
<td><textareaname=”content” id=”content” cols=”60”rows=”15”></textarea></td>
</tr>
<tr>
<tdcolspan=”2” align=”right” ><input type=”submit” name=”button” id=”button”value=”提交” /></td>
</tr>
</table>
</form>
</body>
</html>
----------------------------------------------------------------------------------------------------------------------------------------------------------------------