国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

Die Seite springt nicht
貓熊不說(shuō)話
貓熊不說(shuō)話 2017-10-19 13:00:52
0
2
1538
<?php
if(isset($_GET['action']))
{
	if($_GET['action'] == 'login')
	{
		if ($_POST['name']=='admin'&& $_POST['pwd']==123456 )
		{
			setcookie('userName',$_POST['name'],time()+3600*24);
			header('Location:index.php');
		}else
		{
			echo '<script> alert("用戶名或密碼不對(duì)");</script>';
		}
	}
	elseif ($_GET['action'] == 'logout')
		{
			setcookie('userName','',time()-3600);
		}
}
?>

<!DOCTYPE html> 
<html>
	<head>
		<meta charset = "utf-8">
		<title>用戶登陸</title>
	</head>
	<body>
		<form action = "<?php echo $_SERVER['PHP_SELF'];?>?action = login" method = "post">
			<fieldset>
				<legend>用戶登陸:</legend>
				<label for = "name">用戶名: </label>
				<input type = "text" name = "name" id = "name">
				<label for = "pwd">密碼: </label>
				<input type = "password" name = "pwd" id = "pwd">
				<input type = "submit" value = "提交">
			</fieldset>
		</form>
	</body>
</html>


貓熊不說(shuō)話
貓熊不說(shuō)話

開心點(diǎn),人間不值得

Antworte allen(2)
尋覓 beyond
<form?action?=?"<?php?echo?$_SERVER['PHP_SELF'];?>?action?=?login"?method?=?"post">

url中不能有空格,如果存在空格,空格就會(huì)編碼為某個(gè)字符,相當(dāng)于?action%=%login。刪除等于符號(hào)兩邊的空格就行了

  • Antwort 謝謝謝謝。我太蠢了
    貓熊不說(shuō)話 Autor 2017-10-19 13:16:52
  • Antwort 回復(fù) 貓熊不說(shuō)話:都是過(guò)來(lái)人。初學(xué)的時(shí)候,我也遇到過(guò)這樣的情況
    尋覓 beyond Autor 2017-10-19 13:18:07
  • Antwort 回復(fù) 尋覓 beyond:嗯 我會(huì)記住這個(gè)bug的
    貓熊不說(shuō)話 Autor 2017-10-19 13:19:56
路過(guò)

你傳到當(dāng)前頁(yè)怎么會(huì)跳轉(zhuǎn)

  • Antwort 我是按照視頻敲的 ,m.miracleart.cn/code/14805.html 視頻里跳轉(zhuǎn)了
    貓熊不說(shuō)話 Autor 2017-10-19 13:13:47
  • Antwort 回復(fù) 貓熊不說(shuō)話:action = login &quot;=&quot;前后不能有空格,視頻我沒看過(guò)
    路過(guò) Autor 2017-10-19 13:17:25
  • Antwort 回復(fù) 路過(guò):嗯嗯嗯嗯 已經(jīng)解決了,謝謝啦,我太蠢了
    貓熊不說(shuō)話 Autor 2017-10-19 13:19:27
Neueste Downloads
Mehr>
Web-Effekte
Quellcode der Website
Website-Materialien
Frontend-Vorlage