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"];
로 변경해서 한번 해보세요.
서버관리자에게 연락하세요
@ 하고 $ 띄우신거 아니죠?
댓글을 작성하시려면 로그인이 필요합니다.

프로그램

8,187건
+
제목 글쓴이 날짜 조회
07-04-22 조회 2,612
07-04-22 조회 2,439
07-04-22 조회 2,360
07-04-21 조회 2,429
07-04-21 조회 2,756
07-04-21 조회 2,105
07-04-21 조회 2,526
07-04-21 조회 2,360
07-04-21 조회 2,437
07-04-20 조회 4,254
07-04-20 조회 2,160
07-04-20 조회 2,382
07-04-20 조회 3,419
07-04-20 조회 3,524
07-04-20 조회 2,546
07-04-20 조회 3,151
07-04-20 조회 2,409
07-04-19 조회 3,766
07-04-18 조회 7,839
07-04-18 조회 5,042
07-04-18 조회 3,440
07-04-17 조회 7,592
07-04-17 조회 3,857
07-04-17 조회 3,896
07-04-17 조회 3,342
07-04-16 조회 3,356
07-04-16 조회 3,341
07-04-16 조회 5,212
07-04-15 조회 5,268
07-04-15 조회 6,339
07-04-14 조회 5,439
07-04-13 조회 3,865
07-04-13 조회 3,184
07-04-13 조회 4,138
07-04-13 조회 3,999
07-04-13 조회 3,497
07-04-12 조회 6,692
07-04-12 조회 6,038
07-04-12 조회 5,097
07-04-12 조회 4,694
07-04-12 조회 3,378
07-04-12 조회 3,414
07-04-12 조회 4,934
07-04-11 조회 3,538
07-04-11 조회 3,743
07-04-11 조회 2,984
07-04-11 조회 5,775
07-04-11 조회 3,389
07-04-11 조회 3,512
07-04-11 조회 5,267
07-04-08 조회 5,251
07-04-07 조회 3,342
07-04-05 조회 4,028
07-04-05 조회 6,405
07-04-04 조회 3,632
07-04-04 조회 4,206
07-04-02 조회 9,843
07-03-31 조회 3,234
07-03-31 조회 4,212
07-03-30 조회 3,849
07-03-30 조회 4,222
07-03-29 조회 3,682
07-03-29 조회 3,731
07-03-27 조회 3,977
07-03-27 조회 5,194
07-03-27 조회 3,890
07-03-26 조회 3,948
07-03-24 조회 4,474
07-03-24 조회 4,082
07-03-23 조회 3,322
07-03-22 조회 3,745
07-03-21 조회 3,777
07-03-21 조회 5,283
07-03-21 조회 6,008
07-03-20 조회 3,602
07-03-20 조회 3,783
07-03-20 조회 3,675
07-03-20 조회 5,022
07-03-19 조회 3,654
07-03-19 조회 3,570
07-03-18 조회 2,895
07-03-18 조회 3,190
07-03-18 조회 4,023
07-03-18 조회 4,767
07-03-17 조회 4,273
07-03-16 조회 4,171
07-03-16 조회 3,201
07-03-15 조회 5,339
07-03-15 조회 3,419
07-03-13 조회 5,435
07-03-13 조회 3,733
07-03-13 조회 3,620
07-03-13 조회 4,730
07-03-13 조회 3,459
07-03-13 조회 3,348
07-03-12 조회 4,504
07-03-11 조회 5,190
07-03-11 조회 3,429
07-03-11 조회 3,604
07-03-10 조회 5,043