getpass.php 代码如下,但仍弹出 用户名与电话不匹配!用户名与电话数据库里都有。
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
if (isset($_GET[type])){
$colname_Recordset1 = "-1";
if (isset($_POST['username'])) {
$colname_Recordset1 = $_POST['username'];
}
mysql_select_db($database_conn, $conn);
$query_Recordset1 = sprintf("SELECT * FROM user_biao WHERE username ='$_POST[username]' AND 'tel=$_POST[tel]'");
$Recordset1 = mysql_query($query_Recordset1, $conn) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
}?>
无标题文档登录中心 | |
用户名 | |
电 话: | |
<?php if (isset($_GET[type])){ if ($totalRows_Recordset1 > 0) { // Show if recordset not empty ?> 你的密码是: 你的用户名与电话不匹配! |
mysql_free_result($Recordset1);
?>