📄 change_name.php
字号:
<?php
include "./functions.php";
include "./dbconnect.php";
if($_POST[name] == '')
{
setcookie(message, 名字不能为空!);
header("location:index.php");
exit;
}
if(strlen($_POST[name]) > 25)
{
setcookie(message, 名字太长了,25个字符以内!);
header("location:index.php");
exit;
}
$query = mysql_query("select count(*) as 'num' from `room` where `host` = '".$_POST[name]."' or `guest` = '".$_POST[name]."' limit 1");
if(@mysql_result($query, 0, num))
{
setcookie(message, 抱赚,这个名字已经有人在使用了!);
header("location:index.php");
exit;
}
setcookie(username, str_replace("<", "<", str_replace(">", ">", $_POST[name])));
header("location:index.php");
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -