我已经研究了这么久,我已经这样做了数百次,但我现在忘记了。最简单的事情。如何在 PHP 中进行密码保护。请帮忙,当我点击提交时,什么都没有弹出。这是我的代码:
<html>
<style type="text/css">
#textbox1 {
text-shadow:2px 2px 3px #000000;
}
label {
text-shadow:2px 2px 3px #000000;
font-family:"Arial";
}
</style>
</style>
<script type="text/javascript">
function clearText(target){target.value= "";}
</script>
<head>
<center>
<form action="" method="POST">
<label face="Arial">Password: </label><input id="textbox1" type="password" name="password" value="" onfocus="clearText(this)">
<input id="button" type="submit" value="Login to Uploader">
</form>
</center>
</html>
<?php
$pass = $_POST['password'];
$submit = $_POST['submit'];
if (isset($_POST['submit'])) {
if ($pass == "pengsuploader123" || $pass="pass") {
echo "Test";
} else {
echo "Wrong!";
}
}
?>