在线等!!!帮帮忙吧,php加密函数sha1() $pwd = sha1('$pwd');你没有用$_POST['$pwd']这样的方式获得变量吗? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 $pwd = $_POST['logpwd']; $pwd1 = SHA1($pwd);我是先获取的. $pwd = sha1($pwd);这样子改改或者你把全部代码贴出来看看 <?php include('db_funs.inc'); $name = $_POST['logname']; $pwd = $_POST['logpwd']; $pwd1 = SHA1($pwd); $conn=db_connect(); if (!$conn) { return false; } $query="select bankcard,password,name from readers where bankcard='$name'and password='$pwd1'"; $result=odbc_do($conn,$query); $row=odbc_fetch_array($result); if($row==false) { ?> <script language="VBScript"> <!-- MsgBox "用户名或密码错误,请重新输入!",,"提示" history.back() --> </script> <?php odbc_free_result($result); odbc_close($conn); exit; } else { session_start(); $_SESSION['logname']= odbc_result($result,3); $_SESSION['logpwd']= $pwd; } echo '<meta HTTP-EQUIV="Refresh" Content="0;URL=usserstate.php">';?>高手多多指教,谢谢!!! 如何生成22位的时间戳? queryphp群 在线等关于mysql临时表的使用问题 有人在vista下开发吗,一个关于LDAP的问题 php插入数据到数据库报错 ubuntu 设置PHP环境变量$_ENV 有人找我做一个八字排盘的系统,大家估计要多少钱? 超级郁闷问题? [伸手党]求个function,传入一个规律的二维数组,每个子数组都是键名相同的数组,键值都是整数,返回结果是二维数组多了一个子数组,是每个子数组的求和结果 关于微信 我的附件下载后不能查看,文件大小真实 请高手帮忙把脉! 请问PHP有没有类似JSP的过滤器?
$pwd1 = SHA1($pwd);
我是先获取的.
或者你把全部代码贴出来看看
include('db_funs.inc');
$name = $_POST['logname'];
$pwd = $_POST['logpwd'];
$pwd1 = SHA1($pwd); $conn=db_connect();
if (!$conn)
{
return false;
}
$query="select bankcard,password,name from readers where bankcard='$name'and password='$pwd1'";
$result=odbc_do($conn,$query);
$row=odbc_fetch_array($result);
if($row==false)
{
?>
<script language="VBScript">
<!--
MsgBox "用户名或密码错误,请重新输入!",,"提示"
history.back()
-->
</script>
<?php
odbc_free_result($result);
odbc_close($conn);
exit;
}
else
{
session_start();
$_SESSION['logname']= odbc_result($result,3);
$_SESSION['logpwd']= $pwd;
}
echo '<meta HTTP-EQUIV="Refresh" Content="0;URL=usserstate.php">';?>
高手多多指教,谢谢!!!