当前日期:
$rq=date("Y-m-d");
部分代码,其他的仿着写就行了
<script language="javaScript">
function isEmpty(inputStr){
if(inputStr==null||inputStr==""){
return true
}
return false
}
function checksend(){
var passwd=document.form.passwd.value
var passwdcheck=document.form.passwdcheck.value
if(isEmpty(passwd) || isEmpty(passwdcheck)){
window.alert("用户口令和确认口令不能为空")
document.form.passwd.focus();
return false
}
if(passwd!=passwdcheck){
window.alert("输入口令不相同");
document.form.passwd.focus();
return false;
}
return true
}
</SCRIPT>
<tr>
<td align=left width="15%" height=5>*用户口令</td>
<td align=left height=5 colspan="3
<input type="password" name="passwd" size="20">
</td>
</tr>
<tr>
<td align=left width="15%" height=22>*确认口令</td>
<td align=left height=22 colspan="3">
<input type="password" name="passwdcheck" size="20">
</td>
</tr>
$rq=date("Y-m-d");
部分代码,其他的仿着写就行了
<script language="javaScript">
function isEmpty(inputStr){
if(inputStr==null||inputStr==""){
return true
}
return false
}
function checksend(){
var passwd=document.form.passwd.value
var passwdcheck=document.form.passwdcheck.value
if(isEmpty(passwd) || isEmpty(passwdcheck)){
window.alert("用户口令和确认口令不能为空")
document.form.passwd.focus();
return false
}
if(passwd!=passwdcheck){
window.alert("输入口令不相同");
document.form.passwd.focus();
return false;
}
return true
}
</SCRIPT>
<tr>
<td align=left width="15%" height=5>*用户口令</td>
<td align=left height=5 colspan="3
<input type="password" name="passwd" size="20">
</td>
</tr>
<tr>
<td align=left width="15%" height=22>*确认口令</td>
<td align=left height=22 colspan="3">
<input type="password" name="passwdcheck" size="20">
</td>
</tr>
//---------------------------
// 用户认证函数 user.lib.php
// Author: rei (hehe :)
// Copyright (C) 2001
//---------------------------
if((!isset($user))&&(!isset($pw))){
$user="nousername";
$pw="nopassword";
}
if($pw==""){
$user="nousername";
$pw="nopassword";
}
$host="192.168.0.78"; //ip
session_start();//开始一个session
if(!session_is_registered("sess_name")){ //这个地方有问题,会造成用户
session_register("sess_name"); //重新登录时,输入的$user无效,你自己研究一下吧 :)
$sess_name=$user;
}
$db_id=mysql_connect($host,"root","");
$db_result = mysql_db_query("userlogin","select pword from master where username='$sess_name'",$db_id);
$db_row = mysql_fetch_array($db_result);
$pword = $db_row[0];
mysql_close($db_id);
if(!$pw==$pword){
Header("Location: error.htm");
exit;
}
?>