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건
+
제목 글쓴이 날짜 조회
10-10-27 조회 2,978
10-10-27 조회 2,217
10-10-26 조회 3,324
10-10-26 조회 2,314
10-10-26 조회 2,209
10-10-26 조회 2,219
10-10-25 조회 2,139
10-10-24 조회 2,332
10-10-24 조회 2,372
10-10-24 조회 2,661
10-10-24 조회 4,826
10-10-24 조회 3,346
10-10-23 조회 2,283
10-10-23 조회 3,098
10-10-22 조회 2,131
10-10-22 조회 2,284
10-10-22 조회 3,465
10-10-22 조회 3,176
10-10-22 조회 2,201
10-10-21 조회 2,515
10-10-21 조회 2,464
10-10-21 조회 2,504
10-10-21 조회 2,654
10-10-21 조회 2,399
10-10-21 조회 2,396
10-10-21 조회 2,300
10-10-21 조회 2,476
10-10-21 조회 2,413
10-10-21 조회 3,038
10-10-21 조회 2,185
10-10-20 조회 2,160
10-10-20 조회 2,880
10-10-19 조회 2,894
10-10-19 조회 2,735
10-10-19 조회 2,284
10-10-19 조회 3,021
10-10-19 조회 2,428
10-10-19 조회 3,057
10-10-19 조회 3,476
10-10-19 조회 3,042
10-10-19 조회 9,100
10-10-19 조회 2,622
10-10-19 조회 2,768
10-10-19 조회 2,550
10-10-18 조회 2,652
10-10-18 조회 2,568
10-10-18 조회 2,639
10-10-18 조회 2,317
10-10-18 조회 3,457
10-10-17 조회 2,449
10-10-17 조회 2,311
10-10-17 조회 3,028
10-10-17 조회 2,801
10-10-16 조회 2,462
10-10-16 조회 2,365
10-10-16 조회 2,466
10-10-16 조회 2,838
10-10-16 조회 2,217
10-10-15 조회 2,330
10-10-14 조회 2,499
10-10-14 조회 3,309
10-10-13 조회 2,485
10-10-13 조회 2,627
10-10-13 조회 2,342
10-10-13 조회 2,362
10-10-12 조회 2,784
10-10-12 조회 3,096
10-10-12 조회 2,360
10-10-12 조회 2,836
10-10-11 조회 3,007
10-10-09 조회 2,446
10-10-09 조회 2,305
10-10-07 조회 2,632
10-10-07 조회 2,582
10-10-07 조회 2,284
10-10-07 조회 2,607
10-10-07 조회 2,718
10-10-07 조회 2,739
10-10-06 조회 4,689
10-10-06 조회 2,162
10-10-06 조회 2,921
10-10-06 조회 2,274
10-10-06 조회 3,106
10-10-06 조회 2,101
10-10-06 조회 2,357
10-10-05 조회 2,253
10-10-05 조회 2,304
10-10-05 조회 3,209
10-10-05 조회 4,531
10-10-05 조회 3,458
10-10-05 조회 3,423
10-10-05 조회 2,264
10-10-05 조회 2,480
10-10-05 조회 2,340
10-10-04 조회 2,119
10-10-04 조회 2,500
10-10-04 조회 2,210
10-10-04 조회 2,730
10-10-04 조회 1,995
10-10-04 조회 1,899