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,188건
+
제목 글쓴이 날짜 조회
10-09-25 조회 2,758
10-09-19 조회 2,795
10-09-15 조회 2,809
10-09-15 조회 4,213
10-09-15 조회 3,447
10-09-15 조회 2,540
10-09-07 조회 3,660
10-08-27 조회 4,114
10-06-11 조회 4,296
10-05-31 조회 2,545
10-02-27 조회 5,055
10-02-09 조회 3,801
09-10-10 조회 7,394
09-03-19 조회 3,246
09-02-09 조회 3,520
09-02-09 조회 4,567
08-11-01 조회 2,951
08-09-29 조회 4,606
08-09-26 조회 3,538
08-09-26 조회 3,611
08-09-26 조회 2,748
08-09-26 조회 3,792
08-09-26 조회 3,520
08-09-26 조회 4,290
08-09-18 조회 3,634
08-09-09 조회 3,267
08-08-28 조회 2,810
08-07-06 조회 3,579
08-05-21 조회 4,739
08-05-13 조회 4,584
08-04-17 조회 4,953
08-02-19 조회 3,569
08-01-18 조회 3,897
08-01-10 조회 3,863
07-10-22 조회 3,695
07-10-09 조회 4,362
07-10-03 조회 3,570
07-07-06 조회 4,242
07-07-06 조회 4,457
07-07-06 조회 4,075
07-06-28 조회 3,604
07-06-05 조회 3,615
07-06-05 조회 4,164
07-05-30 조회 3,330
07-05-02 조회 3,709
07-04-15 조회 5,194
07-04-11 조회 3,673
07-04-05 조회 3,975
07-03-31 조회 3,185
07-03-31 조회 4,158
07-03-30 조회 3,774
07-03-24 조회 4,032
07-03-22 조회 3,696
07-03-12 조회 4,450
07-02-16 조회 3,320
07-02-14 조회 5,200
07-02-10 조회 4,044
07-02-09 조회 4,422
07-01-19 조회 4,091
07-01-16 조회 5,025
06-12-16 조회 5,889
06-11-30 조회 3,643
06-11-25 조회 3,756
06-10-15 조회 5,109
06-09-26 조회 5,344
06-09-26 조회 5,466
06-09-22 조회 4,328
06-09-21 조회 3,571
06-09-21 조회 3,673
06-09-02 조회 3,517
06-08-08 조회 5,151
06-07-20 조회 3,780
06-07-17 조회 3,402
06-07-13 조회 4,226
06-07-11 조회 3,518
06-07-11 조회 3,517
06-07-11 조회 3,878
06-06-29 조회 6,121
06-06-19 조회 6,494
06-06-02 조회 3,555
06-05-24 조회 5,028
06-05-14 조회 7,823
06-05-08 조회 3,940
06-02-02 조회 5,493
05-12-16 조회 4,568
05-12-05 조회 5,200
05-06-28 조회 4,161
05-04-11 조회 4,112
05-04-11 조회 4,289
05-04-11 조회 3,352
05-03-13 조회 3,263
05-03-12 조회 4,324
04-12-08 조회 7,818
04-12-01 조회 5,224
04-11-28 조회 3,412
04-11-28 조회 3,246
04-08-05 조회 5,665
04-08-05 조회 5,010
04-08-05 조회 5,623