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건
+
제목 글쓴이 날짜 조회
08-11-25 조회 3,753
08-11-25 조회 2,945
08-11-25 조회 4,519
08-11-25 조회 4,394
08-11-21 조회 4,373
08-11-21 조회 5,302
08-11-20 조회 3,928
08-11-20 조회 3,746
08-11-19 조회 4,012
08-11-19 조회 4,255
08-11-18 조회 4,034
08-11-15 조회 2,914
08-11-14 조회 3,214
08-11-14 조회 2,876
08-11-14 조회 3,276
08-11-13 조회 3,899
08-11-12 조회 1만
08-11-07 조회 4,597
08-11-07 조회 5,587
08-11-03 조회 3,352
08-11-01 조회 5,062
08-11-01 조회 3,012
08-10-30 조회 2,719
08-10-30 조회 3,658
08-10-30 조회 2,756
08-10-30 조회 2,989
08-10-30 조회 2,854
08-10-29 조회 3,937
08-10-29 조회 2,918
08-10-29 조회 2,452
08-10-20 조회 2,581
08-10-18 조회 4,532
08-10-16 조회 3,582
08-10-16 조회 3,387
08-10-14 조회 2,588
08-10-11 조회 3,888
08-10-11 조회 2,487
08-10-09 조회 2,585
08-10-09 조회 2,738
08-10-09 조회 4,210
08-10-08 조회 3,903
08-10-02 조회 3,842
08-10-02 조회 2,590
08-10-02 조회 2,732
08-09-29 조회 4,662
08-09-29 조회 4,293
08-09-26 조회 5,613
08-09-26 조회 3,584
08-09-26 조회 3,647
08-09-26 조회 2,789
08-09-26 조회 3,838
08-09-26 조회 3,573
08-09-26 조회 4,335
08-09-22 조회 3,897
08-09-22 조회 3,083
08-09-22 조회 4,048
08-09-22 조회 3,006
08-09-22 조회 2,656
08-09-21 조회 3,642
08-09-20 조회 4,224
08-09-20 조회 5,496
08-09-20 조회 4,591
08-09-20 조회 2,905
08-09-20 조회 3,309
08-09-20 조회 3,676
08-09-20 조회 3,049
08-09-20 조회 3,243
08-09-20 조회 4,229
08-09-20 조회 3,730
08-09-20 조회 3,312
08-09-19 조회 5,704
08-09-19 조회 4,482
08-09-19 조회 2,795
08-09-18 조회 5,148
08-09-18 조회 4,225
08-09-18 조회 3,602
08-09-18 조회 2,799
08-09-18 조회 3,706
08-09-18 조회 3,502
08-09-17 조회 3,366
08-09-16 조회 3,313
08-09-10 조회 2,525
08-09-09 조회 3,324
08-09-06 조회 4,221
08-09-06 조회 2,773
08-09-06 조회 3,151
08-09-06 조회 2,811
08-09-06 조회 3,037
08-09-06 조회 2,926
08-09-06 조회 2,902
08-09-05 조회 3,900
08-09-05 조회 3,724
08-09-05 조회 3,553
08-09-05 조회 2,777
08-09-05 조회 3,804
08-09-05 조회 5,768
08-09-05 조회 4,220
08-09-05 조회 3,107
08-09-05 조회 3,259
08-09-05 조회 4,685