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,697
08-10-30 조회 2,792
08-10-20 조회 2,523
08-10-11 조회 2,423
08-09-20 조회 4,171
08-09-20 조회 2,839
08-09-18 조회 2,715
08-09-18 조회 3,417
08-09-17 조회 3,285
08-09-05 조회 4,627
08-09-03 조회 2,753
08-08-18 조회 2,891
08-08-17 조회 2,629
08-08-13 조회 3,410
08-07-30 조회 3,469
08-07-28 조회 4,348
08-07-22 조회 5,580
08-07-22 조회 4,061
08-07-10 조회 3,031
08-07-08 조회 3,095
08-06-30 조회 3,855
08-06-30 조회 3,340
08-06-30 조회 3,655
08-06-14 조회 2,723
08-06-11 조회 7,087
08-06-05 조회 3,303
08-05-20 조회 4,819
08-05-13 조회 4,153
08-05-08 조회 3,106
08-05-08 조회 5,262
08-04-25 조회 4,060
08-04-22 조회 4,524
08-04-21 조회 3,166
08-04-17 조회 2,552
08-04-17 조회 2,948
08-04-17 조회 2,250
08-04-17 조회 5,215
08-04-17 조회 4,538
08-04-17 조회 4,527
08-04-17 조회 3,314
08-04-17 조회 3,140
08-04-17 조회 3,628
08-04-17 조회 4,988
08-04-17 조회 5,137
08-04-17 조회 3,345
08-04-04 조회 4,602
08-04-04 조회 2,826
08-04-04 조회 2,569
08-04-04 조회 2,802
08-04-04 조회 2,540
08-04-04 조회 2,774
08-04-03 조회 2,663
08-04-03 조회 2,728
08-04-02 조회 3,046
08-04-02 조회 3,197
08-03-31 조회 3,092
08-03-26 조회 4,265
08-03-11 조회 2,952
08-03-11 조회 2,362
08-03-11 조회 2,373
08-03-07 조회 4,204
08-03-07 조회 3,301
08-03-06 조회 4,752
08-03-04 조회 3,387
08-02-19 조회 3,782
08-02-03 조회 3,403
08-01-18 조회 3,988
08-01-15 조회 3,441
08-01-12 조회 4,288
08-01-12 조회 3,852
08-01-12 조회 3,803
07-12-24 조회 3,095
07-11-30 조회 3,933
07-11-08 조회 4,994
07-11-06 조회 3,852
07-10-26 조회 4,997
07-10-24 조회 4,183
07-10-22 조회 3,570
07-10-19 조회 4,749
07-10-09 조회 4,888
07-10-09 조회 6,752
07-10-05 조회 3,083
07-10-05 조회 4,018
07-10-03 조회 7,532
07-10-03 조회 3,573
07-10-03 조회 2,926
07-10-03 조회 2,851
07-09-28 조회 4,695
07-09-27 조회 3,759
07-09-27 조회 3,214
07-09-13 조회 3,357
07-08-28 조회 3,448
07-08-04 조회 4,833
07-08-01 조회 5,524
07-08-01 조회 4,935
07-07-30 조회 5,442
07-07-29 조회 3,586
07-07-21 조회 3,420
07-07-18 조회 5,376
07-07-16 조회 3,177