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,504
17년 전 조회 3,745
17년 전 조회 3,538
17년 전 조회 2,721
17년 전 조회 3,079
17년 전 조회 2,769
17년 전 조회 2,101
17년 전 조회 3,453
17년 전 조회 2,784
17년 전 조회 3,670
17년 전 조회 1,278
17년 전 조회 2,395
17년 전 조회 1,463
17년 전 조회 1,328
17년 전 조회 1,203
17년 전 조회 1,192
17년 전 조회 1,564
17년 전 조회 3,014
17년 전 조회 3,395
17년 전 조회 3,155
17년 전 조회 2,033
17년 전 조회 4,139
17년 전 조회 1,550
17년 전 조회 1,268
17년 전 조회 1,378
17년 전 조회 1,257
17년 전 조회 1,499
17년 전 조회 1,873
17년 전 조회 2,483
17년 전 조회 2,559
17년 전 조회 1,557
17년 전 조회 1,313
17년 전 조회 2,574
17년 전 조회 3,002
17년 전 조회 3,372
17년 전 조회 3,324
17년 전 조회 2,479
17년 전 조회 3,902
17년 전 조회 3,327
17년 전 조회 5,643
17년 전 조회 2,799
17년 전 조회 2,007
17년 전 조회 2,084
17년 전 조회 1,922
17년 전 조회 1,859
17년 전 조회 2,914
17년 전 조회 2,041
17년 전 조회 1,719
17년 전 조회 2,218
17년 전 조회 1,262
17년 전 조회 1,816
17년 전 조회 3,031
17년 전 조회 2,269
17년 전 조회 1,943
17년 전 조회 2,171
17년 전 조회 1,472
17년 전 조회 1,858
17년 전 조회 1,363
17년 전 조회 1,916
17년 전 조회 1,927
17년 전 조회 1,186
17년 전 조회 3,292
17년 전 조회 4,451
17년 전 조회 2,607
17년 전 조회 7,611
17년 전 조회 3,975
17년 전 조회 4,298
17년 전 조회 2,563
17년 전 조회 3,046
17년 전 조회 3,787
17년 전 조회 4,133
17년 전 조회 3,303
17년 전 조회 3,285
17년 전 조회 3,445
17년 전 조회 2,615
17년 전 조회 2,202
17년 전 조회 3,244
17년 전 조회 3,407
17년 전 조회 4,747
17년 전 조회 1,717
17년 전 조회 2,759
17년 전 조회 2,832
17년 전 조회 2,048
17년 전 조회 2,348
17년 전 조회 1,978
17년 전 조회 2,523
17년 전 조회 3,919
17년 전 조회 4,024
17년 전 조회 2,226
17년 전 조회 1,479
17년 전 조회 1,614
17년 전 조회 1,770
17년 전 조회 1,749
17년 전 조회 1,506
17년 전 조회 1,651
17년 전 조회 1,461
17년 전 조회 1,958
17년 전 조회 2,883
17년 전 조회 1,973
17년 전 조회 1,519