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,370
17년 전 조회 3,615
17년 전 조회 3,403
17년 전 조회 2,578
17년 전 조회 2,950
17년 전 조회 2,642
17년 전 조회 1,956
17년 전 조회 3,328
17년 전 조회 2,639
17년 전 조회 3,534
17년 전 조회 1,164
17년 전 조회 2,265
17년 전 조회 1,338
17년 전 조회 1,208
17년 전 조회 1,082
17년 전 조회 1,061
17년 전 조회 1,437
17년 전 조회 2,874
17년 전 조회 3,270
17년 전 조회 3,012
17년 전 조회 1,894
17년 전 조회 4,009
17년 전 조회 1,424
17년 전 조회 1,137
17년 전 조회 1,249
17년 전 조회 1,130
17년 전 조회 1,381
17년 전 조회 1,753
17년 전 조회 2,342
17년 전 조회 2,429
17년 전 조회 1,431
17년 전 조회 1,182
17년 전 조회 2,451
17년 전 조회 2,872
17년 전 조회 3,242
17년 전 조회 3,182
17년 전 조회 2,340
17년 전 조회 3,764
17년 전 조회 3,186
17년 전 조회 5,512
17년 전 조회 2,668
17년 전 조회 1,870
17년 전 조회 1,944
17년 전 조회 1,784
17년 전 조회 1,722
17년 전 조회 2,781
17년 전 조회 1,899
17년 전 조회 1,583
17년 전 조회 2,078
17년 전 조회 1,141
17년 전 조회 1,676
17년 전 조회 2,887
17년 전 조회 2,133
17년 전 조회 1,822
17년 전 조회 2,039
17년 전 조회 1,336
17년 전 조회 1,719
17년 전 조회 1,231
17년 전 조회 1,784
17년 전 조회 1,801
17년 전 조회 1,054
17년 전 조회 3,152
17년 전 조회 4,328
17년 전 조회 2,475
17년 전 조회 7,480
17년 전 조회 3,838
17년 전 조회 4,171
17년 전 조회 2,432
17년 전 조회 2,898
17년 전 조회 3,641
17년 전 조회 4,014
17년 전 조회 3,168
17년 전 조회 3,160
17년 전 조회 3,307
17년 전 조회 2,473
17년 전 조회 2,072
17년 전 조회 3,118
17년 전 조회 3,263
17년 전 조회 4,622
17년 전 조회 1,598
17년 전 조회 2,629
17년 전 조회 2,702
17년 전 조회 1,918
17년 전 조회 2,230
17년 전 조회 1,847
17년 전 조회 2,386
17년 전 조회 3,787
17년 전 조회 3,901
17년 전 조회 2,096
17년 전 조회 1,373
17년 전 조회 1,510
17년 전 조회 1,651
17년 전 조회 1,630
17년 전 조회 1,395
17년 전 조회 1,539
17년 전 조회 1,357
17년 전 조회 1,841
17년 전 조회 2,754
17년 전 조회 1,852
17년 전 조회 1,403