注册需要用户名密码确认密码邮箱,注册成功后即可登陆;然后另一个php是做留言板,字数控制在100字以内,提交后在网页上显示。制作这两个,麻烦给一下代码。谢谢。满意的话加分。
是要和mysql结合吗?我不是很懂,是要希望大神们指点。
大神你是很会做php和sql么?那能教我一些问题么、、就sql查询会么
追答那你得有具体的需求啊,要查询什么,实现什么功能
追问恩,那加我行么、2758839856
用php做出登陆注册留言板:
<form id="form1" name="form1" method="post" action="<?php echo site_url()."/publish/user_message"?>">
<textarea rows="5" cols="50" name="huifu" <?php if($uere_name == "0"){echo "disabled";}?> >
<?php
if($uere_name == "0")
{echo "抱歉你还没登录不能进行留言";}
?>
</textarea>
<input class="wole" name="author" value="<?php echo $author;?>" /><!--接受方帖子作者-->
<input class="wole" name="news_id" value="<?php echo $news_idx;?>" /><!--文章id-->
<input type="submit" name="Submit"/>
</form>
<script language="javascript">
function updateinfo(){
if(<?php echo $uere_name;?> == 1){
document.form1.Submit.value = "留言";
document.form1.Submit.disabled = false;
}
else{
document.form1.Submit.value = "还未登录";
document.form1.Submit.disabled = "disabled";
}
}
updateinfo();
</script>
回复帖子:
<p>这里是<?php echo $is;?>楼 用户:<?php echo $sel->receiver_author;?> <br />留言内容:<?php echo $sel->content?>
<a onClick="showdiv('contentid<?php echo $is;?>','showtext<?php echo $is;?>')" href="javascript:void(0)">回复</a>
<div id="contentid<?php echo $is;?>" class="none">
<?php
$query = $this->db->query("select * from message where son_id ='$sel->id' order by id");//获取指定父id的子回复
$revis = $query->result();
foreach($revis as $row){?>
<p><?php if($row->sender_author == $row->receiver_author){echo $row->sender_author;}
else{ echo $row->sender_author."回复了:".$row->receiver_author;}?>
内容是:<?php echo $row->content?></p>
<?php }?>
<form action="<?php echo site_url()."/publish/son_message"?>" method="post">
<input name="son_idx" class="wole" value="<?php echo $sel->id?>" />
<input name="receiver_author" class="wole" value="<?php echo $sel->receiver_author;?>" />
<input class="wole" name="news_id" value="<?php echo $news_idx;?>" /><!--文章id-->
<textarea rows="5" cols="50" name="huifux"></textarea>
<br><input type="submit" name="sub" value="回复"></form></div></p>
<script language="JavaScript" type="text/JavaScript">
<!--
function showdiv(targetid,objN){
var target=document.getElementById(targetid);
var clicktext=document.getElementById(objN)
if (target.style.display=="block"){
target.style.display="none";
clicktext.innerText="回复";
} else {
target.style.display="block";
clicktext.innerText='收起';
}
}
-->
</script>
效果图:
做好了,里面可以直接安装,无须建表
只要在config.php填写你数据库连接信息就行了..
安装完打开首页就能进行操作了..
记得安装的时候,先看一下/install/目录下是否有一个叫lock的文件,如果有就先删除...然后再安装,提示安装成功后..
直接进入首页
注册
登录
提交评论
大神会做sql查询那部分的么、、