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,422
17년 전 조회 3,661
17년 전 조회 3,456
17년 전 조회 2,622
17년 전 조회 2,996
17년 전 조회 2,688
17년 전 조회 2,008
17년 전 조회 3,371
17년 전 조회 2,695
17년 전 조회 3,578
17년 전 조회 1,205
17년 전 조회 2,314
17년 전 조회 1,382
17년 전 조회 1,258
17년 전 조회 1,127
17년 전 조회 1,111
17년 전 조회 1,480
17년 전 조회 2,914
17년 전 조회 3,321
17년 전 조회 3,061
17년 전 조회 1,941
17년 전 조회 4,043
17년 전 조회 1,467
17년 전 조회 1,194
17년 전 조회 1,304
17년 전 조회 1,176
17년 전 조회 1,423
17년 전 조회 1,793
17년 전 조회 2,386
17년 전 조회 2,470
17년 전 조회 1,480
17년 전 조회 1,234
17년 전 조회 2,491
17년 전 조회 2,915
17년 전 조회 3,286
17년 전 조회 3,228
17년 전 조회 2,386
17년 전 조회 3,810
17년 전 조회 3,230
17년 전 조회 5,558
17년 전 조회 2,707
17년 전 조회 1,923
17년 전 조회 1,991
17년 전 조회 1,828
17년 전 조회 1,762
17년 전 조회 2,822
17년 전 조회 1,944
17년 전 조회 1,623
17년 전 조회 2,123
17년 전 조회 1,177
17년 전 조회 1,723
17년 전 조회 2,932
17년 전 조회 2,176
17년 전 조회 1,856
17년 전 조회 2,081
17년 전 조회 1,382
17년 전 조회 1,761
17년 전 조회 1,273
17년 전 조회 1,832
17년 전 조회 1,848
17년 전 조회 1,102
17년 전 조회 3,197
17년 전 조회 4,372
17년 전 조회 2,517
17년 전 조회 7,532
17년 전 조회 3,879
17년 전 조회 4,218
17년 전 조회 2,479
17년 전 조회 2,949
17년 전 조회 3,691
17년 전 조회 4,054
17년 전 조회 3,206
17년 전 조회 3,203
17년 전 조회 3,355
17년 전 조회 2,513
17년 전 조회 2,103
17년 전 조회 3,158
17년 전 조회 3,315
17년 전 조회 4,665
17년 전 조회 1,649
17년 전 조회 2,668
17년 전 조회 2,748
17년 전 조회 1,958
17년 전 조회 2,278
17년 전 조회 1,886
17년 전 조회 2,441
17년 전 조회 3,832
17년 전 조회 3,939
17년 전 조회 2,139
17년 전 조회 1,412
17년 전 조회 1,549
17년 전 조회 1,697
17년 전 조회 1,676
17년 전 조회 1,438
17년 전 조회 1,573
17년 전 조회 1,400
17년 전 조회 1,887
17년 전 조회 2,795
17년 전 조회 1,893
17년 전 조회 1,449