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,563
17년 전 조회 3,812
17년 전 조회 3,610
17년 전 조회 2,783
17년 전 조회 3,144
17년 전 조회 2,852
17년 전 조회 2,159
17년 전 조회 3,520
17년 전 조회 2,851
17년 전 조회 3,733
17년 전 조회 1,347
17년 전 조회 2,467
17년 전 조회 1,524
17년 전 조회 1,385
17년 전 조회 1,263
17년 전 조회 1,259
17년 전 조회 1,627
17년 전 조회 3,076
17년 전 조회 3,460
17년 전 조회 3,220
17년 전 조회 2,099
17년 전 조회 4,212
17년 전 조회 1,610
17년 전 조회 1,326
17년 전 조회 1,445
17년 전 조회 1,315
17년 전 조회 1,554
17년 전 조회 1,932
17년 전 조회 2,547
17년 전 조회 2,622
17년 전 조회 1,618
17년 전 조회 1,374
17년 전 조회 2,635
17년 전 조회 3,074
17년 전 조회 3,435
17년 전 조회 3,389
17년 전 조회 2,544
17년 전 조회 3,969
17년 전 조회 3,396
17년 전 조회 5,703
17년 전 조회 2,866
17년 전 조회 2,072
17년 전 조회 2,151
17년 전 조회 1,989
17년 전 조회 1,931
17년 전 조회 2,998
17년 전 조회 2,108
17년 전 조회 1,775
17년 전 조회 2,282
17년 전 조회 1,328
17년 전 조회 1,876
17년 전 조회 3,089
17년 전 조회 2,337
17년 전 조회 2,009
17년 전 조회 2,242
17년 전 조회 1,526
17년 전 조회 1,929
17년 전 조회 1,446
17년 전 조회 1,980
17년 전 조회 1,995
17년 전 조회 1,248
17년 전 조회 3,355
17년 전 조회 4,517
17년 전 조회 2,683
17년 전 조회 7,688
17년 전 조회 4,046
17년 전 조회 4,363
17년 전 조회 2,635
17년 전 조회 3,117
17년 전 조회 3,860
17년 전 조회 4,202
17년 전 조회 3,378
17년 전 조회 3,352
17년 전 조회 3,514
17년 전 조회 2,683
17년 전 조회 2,271
17년 전 조회 3,304
17년 전 조회 3,467
17년 전 조회 4,806
17년 전 조회 1,785
17년 전 조회 2,823
17년 전 조회 2,898
17년 전 조회 2,111
17년 전 조회 2,407
17년 전 조회 2,041
17년 전 조회 2,591
17년 전 조회 3,993
17년 전 조회 4,097
17년 전 조회 2,290
17년 전 조회 1,545
17년 전 조회 1,676
17년 전 조회 1,824
17년 전 조회 1,816
17년 전 조회 1,569
17년 전 조회 1,717
17년 전 조회 1,528
17년 전 조회 2,024
17년 전 조회 2,949
17년 전 조회 2,034
17년 전 조회 1,576