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-09-05 조회 3,647
08-09-05 조회 5,225
08-09-05 조회 3,087
08-09-05 조회 3,706
08-09-05 조회 3,603
08-09-05 조회 3,056
08-09-05 조회 3,600
08-09-04 조회 3,483
08-09-04 조회 3,407
08-09-03 조회 4,588
08-09-03 조회 3,534
08-09-03 조회 2,857
08-09-03 조회 2,842
08-09-03 조회 3,549
08-09-01 조회 4,633
08-08-29 조회 3,622
08-08-28 조회 2,883
08-08-28 조회 5,662
08-08-27 조회 3,381
08-08-21 조회 4,910
08-08-18 조회 7,509
08-08-18 조회 2,977
08-08-18 조회 2,965
08-08-18 조회 2,552
08-08-17 조회 2,701
08-08-16 조회 4,511
08-08-15 조회 3,372
08-08-15 조회 3,959
08-08-14 조회 2,572
08-08-14 조회 4,595
08-08-13 조회 3,472
08-08-12 조회 4,052
08-08-11 조회 2,726
08-08-10 조회 3,120
08-08-09 조회 2,436
08-08-08 조회 2,556
08-08-08 조회 3,124
08-08-08 조회 2,492
08-08-08 조회 5,623
08-08-07 조회 2,873
08-08-05 조회 3,296
08-08-03 조회 8,508
08-08-03 조회 2,651
08-08-02 조회 3,229
08-08-01 조회 4,582
08-07-31 조회 2,563
08-07-31 조회 3,300
08-07-31 조회 2,421
08-07-31 조회 3,125
08-07-30 조회 3,537
08-07-28 조회 4,419
08-07-25 조회 2,522
08-07-23 조회 2,600
08-07-23 조회 2,870
08-07-22 조회 2,495
08-07-22 조회 5,655
08-07-22 조회 5,256
08-07-22 조회 4,132
08-07-20 조회 2,844
08-07-19 조회 2,600
08-07-18 조회 2,995
08-07-18 조회 3,890
08-07-17 조회 2,986
08-07-15 조회 3,361
08-07-15 조회 2,555
08-07-11 조회 2,314
08-07-11 조회 2,387
08-07-10 조회 4,335
08-07-10 조회 3,814
08-07-10 조회 3,352
08-07-10 조회 3,370
08-07-10 조회 3,087
08-07-10 조회 3,533
08-07-10 조회 3,360
08-07-10 조회 3,211
08-07-08 조회 3,152
08-07-08 조회 2,423
08-07-06 조회 3,105
08-07-06 조회 3,635
08-07-05 조회 3,660
08-07-04 조회 3,040
08-07-03 조회 2,811
08-07-03 조회 2,686
08-07-02 조회 3,840
08-06-30 조회 3,904
08-06-30 조회 3,394
08-06-30 조회 3,702
08-06-28 조회 4,027
08-06-27 조회 2,555
08-06-27 조회 2,489
08-06-27 조회 7,666
08-06-27 조회 2,432
08-06-25 조회 2,870
08-06-24 조회 3,091
08-06-24 조회 2,353
08-06-23 조회 2,426
08-06-19 조회 3,230
08-06-19 조회 2,853
08-06-19 조회 4,999
08-06-19 조회 2,473