g

에러좀 찾아주세요

책에 있는 소스를 실행했는데, 에러가 납니다. 어디가 잘못 되었는지요.

===============================
source : php와 html을 사용해서 간단한 인증 구현
===============================

<?php
// 짧은 스타일의 변수로 만든다.
@ $name = $_POST['name'];
@ $password = $_POST['password'];

if(empty($name)||empty($password))
{
//방문자는 이름과 비밀번호를 써야 한다.
?>
<h1>Please Log In</h1>
This page is secret.
<form method="post" action="secret.php">
<table border="1">
<tr>
<th> Username </th>
<td> <input type="text" name="name"> </td>
</tr>
<tr>
<th> Password </th>
<td> <input type="password" name="password"> </td>
</tr>
<tr>
<td colspan="2" align="center">
<input type="submit" value="Log In">
</td>
</tr>
</table>
</form>
<?php
}
else if($name=='user'&&$password=='pass')
{
// 방문자의 이름, 비밀번호쌍이 맞는 정보였을 때.
echo '<h1>Here it is!</h1>';
echo 'I bet you are glad you can see this secret page.';
}
else
{
// 방문자의 이름, 비밀번호쌍이 틀렸을 때.
echo '<h1>Go Away!</h1>';
echo 'You are not authorized to view this resource.';
}
?>


===================
에러코드
===================

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.


--------------------------------------------------------------------------------

Apache Server at localhost Port 80
|

댓글 4개

@ $name = $_POST['name'];
@ $password = $_POST['password'];
부분을
$name = $_POST["name"];
$password = $_POST["password"];
로 변경해서 한번 해보세요.
서버관리자에게 연락하세요
@ 하고 $ 띄우신거 아니죠?
댓글을 작성하시려면 로그인이 필요합니다.

프로그램

+
제목 글쓴이 날짜 조회
17년 전 조회 1,462
17년 전 조회 3,705
17년 전 조회 3,513
17년 전 조회 2,676
17년 전 조회 3,047
17년 전 조회 2,736
17년 전 조회 2,057
17년 전 조회 3,416
17년 전 조회 2,741
17년 전 조회 3,631
17년 전 조회 1,242
17년 전 조회 2,367
17년 전 조회 1,421
17년 전 조회 1,290
17년 전 조회 1,168
17년 전 조회 1,146
17년 전 조회 1,529
17년 전 조회 2,979
17년 전 조회 3,365
17년 전 조회 3,113
17년 전 조회 1,987
17년 전 조회 4,098
17년 전 조회 1,509
17년 전 조회 1,230
17년 전 조회 1,348
17년 전 조회 1,221
17년 전 조회 1,462
17년 전 조회 1,828
17년 전 조회 2,444
17년 전 조회 2,518
17년 전 조회 1,515
17년 전 조회 1,269
17년 전 조회 2,531
17년 전 조회 2,969
17년 전 조회 3,329
17년 전 조회 3,283
17년 전 조회 2,439
17년 전 조회 3,859
17년 전 조회 3,286
17년 전 조회 5,603
17년 전 조회 2,767
17년 전 조회 1,968
17년 전 조회 2,046
17년 전 조회 1,878
17년 전 조회 1,812
17년 전 조회 2,879
17년 전 조회 1,997
17년 전 조회 1,672
17년 전 조회 2,179
17년 전 조회 1,217
17년 전 조회 1,783
17년 전 조회 2,986
17년 전 조회 2,227
17년 전 조회 1,911
17년 전 조회 2,136
17년 전 조회 1,431
17년 전 조회 1,817
17년 전 조회 1,326
17년 전 조회 1,887
17년 전 조회 1,889
17년 전 조회 1,139
17년 전 조회 3,253
17년 전 조회 4,424
17년 전 조회 2,573
17년 전 조회 7,579
17년 전 조회 3,935
17년 전 조회 4,263
17년 전 조회 2,519
17년 전 조회 2,994
17년 전 조회 3,748
17년 전 조회 4,099
17년 전 조회 3,260
17년 전 조회 3,250
17년 전 조회 3,404
17년 전 조회 2,569
17년 전 조회 2,158
17년 전 조회 3,206
17년 전 조회 3,370
17년 전 조회 4,710
17년 전 조회 1,689
17년 전 조회 2,726
17년 전 조회 2,801
17년 전 조회 2,012
17년 전 조회 2,318
17년 전 조회 1,942
17년 전 조회 2,482
17년 전 조회 3,881
17년 전 조회 3,990
17년 전 조회 2,186
17년 전 조회 1,444
17년 전 조회 1,584
17년 전 조회 1,734
17년 전 조회 1,710
17년 전 조회 1,479
17년 전 조회 1,619
17년 전 조회 1,430
17년 전 조회 1,927
17년 전 조회 2,843
17년 전 조회 1,926
17년 전 조회 1,486