會員注冊php
1. phpcms 注冊 添加用戶 操作失敗 最新版的V9 注冊和添加會員 操作失敗,怎麼解決啊
一、檢查伺服器是否填寫了DNS,即伺服器是否能上網訪問www.phpcms.cn。有部分用戶是本機通信失敗,檢查C:\WINDOWS\system32\drivers\etc\hosts文件,如果用的是localhost域名訪問,本機是否綁定了127.0.0.1 localhost
二、檢查phpsso的訪問地址是否正確,然後查看設置->phpsso設置中的應用id、介面地址、加密密鑰、版本號和phpsso->應用管理->編輯應用中的對應選項是否一致。
2. 用php寫會員注冊 密碼加密問題
數據肢信瞎被截獲是無法避免的,除非用SSL加密。
比較安全的方法坦賀可以這樣:
1. 數據正常提交至lr.php
2. 獲取一個當前時間time()
3. 將密碼組合time()後md5
4. 將組合後的密碼md5值和歷空之前獲取的time()一起存入資料庫。
當今後需要登錄時首先獲取用戶名對應的time(),再組合上密碼進行md5,和資料庫內的密碼md5對比。
3. 如何用php做出登陸注冊留言板
用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>
效果圖: