冲钱会员 php,php会员充值问题

这是一个关于会员充值页面的代码实现,使用PHP进行数据库操作。代码首先定义了一个GetSQLValueString函数来处理输入值,然后检查表单是否已提交并更新会员的余额。如果表单已提交,它将更新`user_biao`表中指定用户的余额,并重定向到`hy.php`。同时,显示了会员的详细信息,包括用户名、性别、电话、邮箱、现有金额、注册时间和注册IP。
摘要由CSDN通过智能技术生成

会员充值页面中  记录集代码要具体插在什么位置呢

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 (!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;

}

}

$editFormAction = $_SERVER['PHP_SELF'];

if (isset($_SERVER['QUERY_STRING'])) {

$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);

}

if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form1")) {

$updateSQL = sprintf("UPDATE user_biao SET syje=%s WHERE `uid`=%s",

GetSQLValueString($_POST['syje']+$row_Recordset1['syje'], "int"),

GetSQLValueString($_POST['hiddenField'], "int"));

mysql_select_db($database_conn, $conn);

$Result1 = mysql_query($updateSQL, $conn) or die(mysql_error());

$updateGoTo = "hy.php";

if (isset($_SERVER['QUERY_STRING'])) {

$updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?";

$updateGoTo .= $_SERVER['QUERY_STRING'];

}

header(sprintf("Location: %s", $updateGoTo));

}

$colname_Recordset1 = "-1";

if (isset($_GET['uid'])) {

$colname_Recordset1 = $_GET['uid'];

}

mysql_select_db($database_conn, $conn);

$query_Recordset1 = sprintf("SELECT * FROM user_biao WHERE `uid` = %s", GetSQLValueString($colname_Recordset1, "int"));

$Recordset1 = mysql_query($query_Recordset1, $conn) or die(mysql_error());

$row_Recordset1 = mysql_fetch_assoc($Recordset1);

$totalRows_Recordset1 = mysql_num_rows($Recordset1);

?>

无标题文档

会员详细

 
用户名<?php echo $row_Recordset1['username']; ?>
性别<?php echo $row_Recordset1['xingbie']; ?>
电话<?php echo $row_Recordset1['tel']; ?>
邮箱<?php echo $row_Recordset1['dizhi']; ?>
金额

现有金额

注册时间<?php echo $row_Recordset1['t']; ?>
注册ip<?php echo $row_Recordset1['ip']; ?>
 

mysql_free_result($Recordset1);

?>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值