简单文章发布系统(4)
来源:互联网 发布:由于网络原因上传失败 编辑:程序博客网 时间:2024/06/06 03:56
一、文章修改界面
<?php require_once('../connect.php');//读取旧信息$id=$_GET['id'];$query=mysql_query("select * from article where id=$id");//产生结果集$data=mysql_fetch_assoc($query);?><html><head><meta http-equiv="Content-type" content="text/html;charset=utf-8"/ ><title>无标题文档</title><style type="text/css">body{margin-left:0px;margin-tip: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="213" 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="854" valign="top" bgcolor="#FFFFFF"><form id="form1" name="form1" method="post" action="article.modify.handle.php"><input type="hidden" name="id" value="<?php echo $data['id']?>" /><table width="590" border="0" cellpadding="8" cellspacing="1"><tr><td colspan="2" align="center">修改文章</td></tr><tr><td width="119">标题</td><td width="437"><label for="title"></label><input type="text" name="title" id="title" value="<?php echo $data['title']?>"/> </td></tr><tr><td>作者</td><td><input type="text" name="auther" id="auther" value="<?php echo $data['auther'] ?>"></td></tr><tr><td>简介</td><td><label for="description"></label><textarea name="description" id="description" cols="60" rows="5"><?php echo $data['description']?></textarea></td></tr><tr><td>内容</td><td><textarea name="content" cols="60" rows="20" id="content"><?php echo $data['content']?></textarea></td></tr><tr><td colspan="2" align="right"><input type="submit" name="button" id ="button" value="提交"/></td></tr></table></form></td></tr></table></body></html>
二、文章修改程序
<?php require_once('../connect.php');$id=$_POST['id'];$title=$_POST['title'];$auther=$_POST['auther'];$description=$_POST['description'];$content=$_POST['content'];$dateline=time();$updatesql=" update article set title='$title',auther='auther',description='$description',content='$content',dateline=$dateline where id=$id";if(mysql_query($updatesql)){echo "<script>alert('修改文章成功');window.location.href='article.manage.php'</script>";}else{echo "<script>alert('修改文章失败');windon.location.href='article.manage.php'</script>";}?>
0 0
- 简单文章发布系统(4)
- 简单文章发布系统(1)
- 简单文章发布系统(2)
- 简单文章发布系统(3)
- 简单文章发布系统(5)
- 简单文章发布系统(6)
- 简单文章发布系统(1)
- 文章发布系统
- LAMP---文章发布系统
- 文章发布系统
- mysql,php文章发布系统
- 简单文章管理系统
- Discuz! 5.5.0(GBK版本) CMS 1.1 文章系统发布(最后更新:2007-4-18)
- JavaWeb 入门级项目实战 -- 文章发布系统 (第九节)
- JavaWeb 入门级项目实战 -- 文章发布系统 (第十节)
- 构建ASP.NET MVC4+EF5+EasyUI+Unity2.x注入的后台管理系统(37)-文章发布系统④-百万级数据和千万级数据简单测试
- ASP.NET MVC5+EF6+EasyUI 后台管理系统(37)-文章发布系统④-百万级数据和千万级数据简单测试
- 文章发布系统-系统架构设计
- cocos2d-x环境搭建 window+eclipse+ndk
- UVA - 10057 A mid-summer night's dream.
- 题目1554:区间问题
- 用Python开始机器学习(4:KNN分类算法)
- SharePoint 2013 REST 服务使用简介
- 简单文章发布系统(4)
- Linux命令英文全称
- poj 2243 Knight Moves
- UVA - 10801 Lift Hopping (Dijkstra)
- 容器 第二节 重写equals和hashCode方法
- hibernate之13.hql(二)
- GitHub 优秀的 Android 开源项目
- HDU 5011 Game 【Nim博弈】
- codeforces 476c Dreamoon and Sums