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건
+
제목 글쓴이 날짜 조회
08-10-30 조회 2,689
08-10-30 조회 2,783
08-10-20 조회 2,515
08-10-11 조회 2,420
08-09-20 조회 4,162
08-09-20 조회 2,828
08-09-18 조회 2,700
08-09-18 조회 3,408
08-09-17 조회 3,279
08-09-05 조회 4,618
08-09-03 조회 2,737
08-08-18 조회 2,882
08-08-17 조회 2,624
08-08-13 조회 3,401
08-07-30 조회 3,464
08-07-28 조회 4,343
08-07-22 조회 5,572
08-07-22 조회 4,055
08-07-10 조회 3,022
08-07-08 조회 3,087
08-06-30 조회 3,850
08-06-30 조회 3,335
08-06-30 조회 3,649
08-06-14 조회 2,710
08-06-11 조회 7,080
08-06-05 조회 3,299
08-05-20 조회 4,811
08-05-13 조회 4,146
08-05-08 조회 3,097
08-05-08 조회 5,255
08-04-25 조회 4,050
08-04-22 조회 4,514
08-04-21 조회 3,163
08-04-17 조회 2,541
08-04-17 조회 2,942
08-04-17 조회 2,241
08-04-17 조회 5,206
08-04-17 조회 4,528
08-04-17 조회 4,522
08-04-17 조회 3,302
08-04-17 조회 3,126
08-04-17 조회 3,619
08-04-17 조회 4,981
08-04-17 조회 5,130
08-04-17 조회 3,342
08-04-04 조회 4,586
08-04-04 조회 2,815
08-04-04 조회 2,558
08-04-04 조회 2,790
08-04-04 조회 2,531
08-04-04 조회 2,762
08-04-03 조회 2,652
08-04-03 조회 2,721
08-04-02 조회 3,038
08-04-02 조회 3,186
08-03-31 조회 3,083
08-03-26 조회 4,252
08-03-11 조회 2,945
08-03-11 조회 2,359
08-03-11 조회 2,365
08-03-07 조회 4,194
08-03-07 조회 3,292
08-03-06 조회 4,733
08-03-04 조회 3,377
08-02-19 조회 3,772
08-02-03 조회 3,397
08-01-18 조회 3,973
08-01-15 조회 3,431
08-01-12 조회 4,278
08-01-12 조회 3,845
08-01-12 조회 3,796
07-12-24 조회 3,082
07-11-30 조회 3,924
07-11-08 조회 4,986
07-11-06 조회 3,836
07-10-26 조회 4,982
07-10-24 조회 4,165
07-10-22 조회 3,560
07-10-19 조회 4,741
07-10-09 조회 4,873
07-10-09 조회 6,741
07-10-05 조회 3,073
07-10-05 조회 4,009
07-10-03 조회 7,517
07-10-03 조회 3,567
07-10-03 조회 2,906
07-10-03 조회 2,837
07-09-28 조회 4,679
07-09-27 조회 3,744
07-09-27 조회 3,197
07-09-13 조회 3,342
07-08-28 조회 3,433
07-08-04 조회 4,818
07-08-01 조회 5,518
07-08-01 조회 4,925
07-07-30 조회 5,428
07-07-29 조회 3,572
07-07-21 조회 3,410
07-07-18 조회 5,365
07-07-16 조회 3,169