📄 login.php
字号:
<!---Login php srcipt begins here--->
<?
mysql_connect("localhost", "root", "")
or die ("Unable to connect to server.");
mysql_select_db("secretDB")
or die ("Unable to select database.");
$sql = "SELECT id
FROM users
WHERE username='$username' and password='$password'";
$result = mysql_query($sql)
or die ("Unable to get results.");
$num = mysql_numrows($result)
or die ("You're not authorized to be here. If you feel you have recieved this
message in error, please contact the <a
href=\"mailto:tyler.longren@midiowa.net\">webmaster</a>");
if ($num == 1) {
echo "<p>You can be here<br>";
echo "Your username is $username</p>";
}
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -