站长管理 • 知识共享

站长管理 • 知识共享

营销运营,将想法和焦点与您共享

文章发布系统

蚂蚁网络 | 发表于: 2022-10-23 | 阅读量: (893)


文章发布系统
搜一搜
深圳蚂蚁网络网站建设
深圳蚂蚁网络网站建设公司小编今天给大家整理了一篇有关《 文章发布系统 》的相关文章,更多详细内容,欢迎继续往下阅读,下面就由深圳蚂蚁网络小编来分享给大家!


文章发布系统
  createtablearticle(

  ->idint(11)primarykeyauto_incrementdefaultnull,

  ->titlechar(100)notnull,

  ->authorchar(50)notnull,

  ->descriptionvarchar(255)notnull,

  ->cotenttextnotnull,

  ->datelineint(11)

  ->)ENGINE=INNODBDEFAULTCHARSET=utf8;

  这是数据表

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style type="text/css">
body {
    margin-left: 0px;
    margin-top: 0px;
    margin-right: 0px;
    margin-bottom: 0px;
}
</style>
</head>
 
<body>
<table width="100%" height="520" border="0" cellpadding="8" cellspacing="1" bgcolor="#000000">
  <tr>
    <td height="89" colspan="2" bgcolor="#FFFF99"><strong>后台管理系统</strong></td>
  </tr>
  <tr>
    <td width="156" height="287" align="left" valign="top" bgcolor="#FFFF99"><p><a href="article.add.php">发布文章</a></p>
    <p><a href="article.manage.php">管理文章</a></p>      <a href="article.add.php"></a></td>
    <td width="837" valign="top" bgcolor="#FFFFFF">
    <form id="form1" name="form1" method="post" action="article.add.handle.php">
      <table width="779" border="0" cellpadding="8" cellspacing="1">
        <tr>
          <td colspan="2" align="center">发布文章</td>
          </tr>
        <tr>
          <td width="119">标题</td>
          <td width="625"><label for="title"></label>
            <input type="text" name="title" id="title" /></td>
        </tr>
        <tr>
          <td>作者</td>
          <td><input type="text" name="author" id="author" /></td>
        </tr>
        <tr>
          <td>简介</td>
          <td><label for="description"></label>
            <textarea name="description" id="description" cols="60" rows="5"></textarea></td>
        </tr>
        <tr>
          <td>内容</td>
          <td><textarea name="content" cols="60" rows="15" id="content"></textarea></td>
        </tr>
        <tr>
          <td colspan="2" align="right"><input type="submit" name="button" id="button" value="提交" /></td>
          </tr>
      </table>
    </form></td>
  </tr>
  <tr>
    <td colspan="2" bgcolor="#FFFF99"><strong>版权所有</strong></td>
  </tr>
</table>
</body>
</html>
这是页面
require_once('../connect.php');

//把传递过来的信息入库,在入库之前对所有的信息进行校验。

if(!(isset($_POST['title'])&&(!empty($_POST['title'])))){

echo "<script>alert('标题不能为空');window.location.href='article.add.php';</script>";

}



$title = $_POST['title'];

$author = $_POST['author'];

$description = $_POST['description'];

$content = $_POST['content'];

$dateline =  time();

$insertsql = "insert into article(title, author, description, content, dateline) values('$title', '$author', '$description', '$content', $dateline)";

 //echo  $insertsql;

if(mysql_query($insertsql)){

echo "<script>alert('发布文章成功');window.location.href='article.manage.php';</script>";

}else{

echo "<script>alert('发布失败');window.location.href='article.manage.php';</script>";



}  

?>

    插入数据,

header("Content-type:text/html charset=utf-8");

    define('localhost','127.0.0.1');

    define('USERNAME', 'root');

    define('PASSWORD', '201609');

配置文件

require_once('config.php');

   //连库

   if(!($con=mysql_connect(localhost,USERNAME,PASSWORD))){

      echo  mysql_error();

   }

   //选库

   if(mysql_select_db('code')){

       echo  mysql_error();

   }

   //字符集

   if(mysql_query('set names utf8')){

       echo  mysql_error();

   }

连接库

但是就是发布失败
  以上就是深圳蚂蚁网络小编为您整理的关于《 文章发布系统 》的相关内容,希望对您有所帮助,您可能还对这篇文章感兴趣《想用那个人人开源的二次开发平台进行开发一个成绩管理系统,但有点方》,如需了解更多相关内容,请继续访问本站,点击返回首页

"

扫二维码与项目经理沟通

我们在微信上24小时为你服务



—— 企业互联网品牌建设服务商

"

  目前,文章发布系统标签聚合页面仍在完善中,后续将为您提供丰富、全面的关于《 文章发布系统 》的详细内容。深圳蚂蚁网络小编将持续收集、更新,补充完善信息。

—— 网站推荐 ——

网站建设头条

http://www.antnw.cn

网站建设问答

https://ask.antnw.cn

蚂蚁聚合搜索

http://search.antnw.com



深圳蚂蚁网络网站建设公司提供, 增长黑客 系统开发 系统定制 深圳网站建设 联系我们 等互联网项目定制开发服务。深圳蚂蚁网络声明:如发现内容存在版权问题,烦请提供相关信息发邮件至3310459304@qq.com,我们将及时沟通与处理。本站内容均来源于网络,涉及言论、版权与本站无关。

来源:蚂蚁网络
原文地址:https://wwww.gd-jd.com/news/zhubao/186

热门标签

最新文章

X