📄 do_authuser.php
字号:
<?
//check for required fields
if ((!$_POST[username]) || (!$_POST[password])) {
header( "Location: http://82.39.116.47/reg/Error.html");
exit;
}
//setup names of database and table to use
$db_name = "users";
$table_name = "auth_users";
//connect to server and select database
$connection = @mysql_connect("localhost", "jackie", "123456") or die(mysql_error());
$db = @mysql_select_db($db_name, $connection) or die(mysql_error());
//build and issue the query
$sql = "SELECT * FROM $table_name WHERE username =
'$_POST[username]' AND password = password('$_POST[password]')";
$result = @mysql_query($sql,$connection) or die(mysql_error());
//get the number of rows in the result set
$num = mysql_num_rows($result);
//print a message or redirect elsewhere, based on result
if ($num != 0) {
setcookie("auth", "$_POST[username]");
$display_block = "
<p><strong>Secret Menu:</strong></p>
<ul>
<li><a href=\"PHP_Photo_Gallery.php\">Photo Gallery</a>
<li><a href=\"100.php\">File Edit System</a>
<li><a href=\"BBS.php\">Go To BBS</a>
<li><a href=\"index.php\">Home</a>
</ul>";
// header ("Location: http://82.39.116.47/reg/index2.php");
// exit;
} else {
header( "Location: http://82.39.116.47/reg/Error.html");
exit;
}
?>
<HTML>
<HEAD>
<TITLE>Secret Area</TITLE>
</HEAD>
<body bgcolor="#ccccff" link="#0000ff" vlink="#0000ff" alink="#0033ff">
<? echo "$display_block"; ?>
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -