可怜的一天,我可怜的小7
2011-08-30 20:39
225 查看
BLOG
今天换完系统,从WIN7改为XP3 许多东西不能使用,重新装了360 集成环境wamp zend studio 5 ….
重新写了一下今天的留言板 虽然没有达到老师的设想(能够回复)
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php
include("conn.php");
$title=$_POST['title'];
$user=$_POST['user'];
$content=$_POST['content'];
$sql="insert into message(id,user,title,content,lastdate) values(null,'$user','$title','$content',now())";
$rs=mysql_query($sql);
if($rs){
?>
<script>
if(confirm("发表成功,还需要继续么")){
location="add.php";
}else{
location="list.php";
}
</script>
<?php
}
?>
//把数据写入mysql
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php
include('conn.php');
$sql="select * from message";
$result=mysql_query($sql);
while($rs=mysql_fetch_array($result)){
?>
<body>
<table width="500" cellpadding="15" cellspacing="10" bgcolor="#999999" height="100" border="2" align="center">
<tr bgcolor="#FFFFFF">
<td>标题:<?php echo $rs['title'] ?> 用户:<?php echo $rs['user']?> 日期:<?php echo $rs['lastdate']?></td>
</tr>
<tr bgcolor="#FFFFFF">
<td>内容:<?php echo htmtocode($rs['content'])?></td>
</tr>
</table>
<?php
}
?>
//从库中提取出来显示 (这里编码出了些问题,最后改好了)
一天很辛苦,也很充实。。。
今天换完系统,从WIN7改为XP3 许多东西不能使用,重新装了360 集成环境wamp zend studio 5 ….
重新写了一下今天的留言板 虽然没有达到老师的设想(能够回复)
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php
include("conn.php");
$title=$_POST['title'];
$user=$_POST['user'];
$content=$_POST['content'];
$sql="insert into message(id,user,title,content,lastdate) values(null,'$user','$title','$content',now())";
$rs=mysql_query($sql);
if($rs){
?>
<script>
if(confirm("发表成功,还需要继续么")){
location="add.php";
}else{
location="list.php";
}
</script>
<?php
}
?>
//把数据写入mysql
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php
include('conn.php');
$sql="select * from message";
$result=mysql_query($sql);
while($rs=mysql_fetch_array($result)){
?>
<body>
<table width="500" cellpadding="15" cellspacing="10" bgcolor="#999999" height="100" border="2" align="center">
<tr bgcolor="#FFFFFF">
<td>标题:<?php echo $rs['title'] ?> 用户:<?php echo $rs['user']?> 日期:<?php echo $rs['lastdate']?></td>
</tr>
<tr bgcolor="#FFFFFF">
<td>内容:<?php echo htmtocode($rs['content'])?></td>
</tr>
</table>
<?php
}
?>
//从库中提取出来显示 (这里编码出了些问题,最后改好了)
一天很辛苦,也很充实。。。
相关文章推荐
- 可怜的一天!!
- 可怜的朵朵,上幼儿园第二天差不多哭了一天
- 我快乐又可怜的一天哦~
- 今天真是不在状态的一天,又是一个书写的错误(本文仅为提醒自己,你可以选择跳过)
- 一天连十万字都读不到的人是没有出路的
- 旧文重发:程序员的一天
- PHP获取某个月最大天数(最后一天)的方法
- 某一天
- 获得一个月的第一天与最后一天
- 周末的一天
- 判断一年中某一天是这一年的第几天的函数接口
- 用了一天时间安装和配置ubuntu
- 获取指定月份最后一天
- 真的没有几个人能做到!--如果你休息一天,实力就会倒退两天--2500多个日子里只有5天在休息!
- 充实的一天
- 美好的一天
- Javascript和python获取月份第一天和最后一天
- 正月十五,团圆的一天,银行卡找不到了,肯定是自己的失误造成的
- 投行人的一天