Home > Backend Development > PHP Tutorial > 杏林同学录(二)

杏林同学录(二)

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-01 14:30:26
Original
874 people have browsed it
成员主页:main.php

session_start(); // 开始session
session_register("userregister");
$userregister=$username;
include "class/config.php";
$result = MySQL_query("SELECT * FROM user where user='$username'",$db);
if (mysql_num_rows($result)==0){ //若返回列的数目为0,说明无此资料
echo "无此用户!";
exit;}
$userpsw=strtoupper(trim($userpsw));
$passWord=trim(mysql_result($result,0,'psw'));
$password=strtoupper($password);//取得密码,转换成大写
$userpsw=strtoupper($userpsw);
if (!($userpsw==$password)){
echo "密码错误!";
mysql_close($db);
exit;
}
$name=mysql_result($result,0,"name");
$count=mysql_result($result,0,"count")+1;//成员计数器加1
mysql_query("UPDATE user SET count=$count where user='$username'",$db);
?>



娆㈣
Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template