usersetsave.php
资源名称:minierp.rar [点击查看]
上传用户:yantgcom
上传日期:2013-07-19
资源大小:478k
文件大小:1k
源码类别:
MySQL数据库
开发平台:
PHP
- <?php
- $t_AUTOID=$_GET[x_AUTOID];
- if (empty($t_AUTOID)){$t_AUTOID=0;};
- $t_UID =$_GET[x_UID]; //鐢ㄦ埗绶ㄨ櫉
- $t_UNAME =$_GET[x_UNAME]; //鐢ㄦ埗鍚嶇ū
- $t_UPASS =$_GET[x_UPASS]; //鐢ㄦ埗瀵嗙⒓
- include ("../inc/db.php");
- include ("../inc/phpmkrfn.php");
- $m_tablename="user";
- $FIELDSTR =" UID ='$t_UID',";
- $FIELDSTR .=" UNAME ='$t_UNAME',";
- if (!empty($t_UPASS)){$FIELDSTR .=" UPASS =MD5('$t_UPASS'),";};
- $FIELDSTR .=" DT999 = now() ";
- $conn = phpmkr_db_connect(HOST, USER, PASS, DB, PORT);
- $sSql = "select * from $m_tablename where autoid =$t_AUTOID";
- $rs = phpmkr_query($sSql,$conn) or die("Failed to execute query: " . phpmkr_error() . '<br>SQL: ' . $sSql);
- if (phpmkr_num_rows($rs) > 0){
- $uSql = "update $m_tablename set ";
- $uSql .=$FIELDSTR;
- $uSql .=" where autoid =$t_AUTOID";
- }
- else
- {
- $uSql = "INSERT INTO $m_tablename set ";
- $uSql .=$FIELDSTR;
- }
- $rs = phpmkr_query($uSql,$conn) or die("Failed to execute query: " . phpmkr_error() . '<br>SQL: ' . $uSql);
- header("location:usersetlist.php");
- ?>