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건
+
제목 글쓴이 날짜 조회
07-07-16 조회 3,122
07-07-06 조회 3,006
07-07-06 조회 3,438
07-06-23 조회 3,267
07-06-16 조회 2,774
07-05-20 조회 4,281
07-05-09 조회 3,457
07-05-09 조회 6,097
07-05-04 조회 2,691
07-04-30 조회 9,828
07-04-27 조회 4,328
07-04-26 조회 3,442
07-04-25 조회 5,286
07-04-18 조회 7,784
07-04-13 조회 3,119
07-04-12 조회 6,631
07-04-12 조회 5,037
07-04-12 조회 3,348
07-04-11 조회 5,714
07-04-05 조회 6,355
07-03-24 조회 4,416
07-03-20 조회 3,737
07-03-18 조회 3,990
07-03-18 조회 4,735
07-03-17 조회 4,234
07-03-16 조회 4,127
07-03-15 조회 5,292
07-03-13 조회 5,399
07-03-13 조회 3,582
07-03-08 조회 4,495
07-03-08 조회 3,980
07-03-08 조회 3,291
07-03-08 조회 4,182
07-03-05 조회 4,432
07-03-04 조회 2,907
07-03-01 조회 5,942
07-02-28 조회 3,230
07-02-27 조회 4,405
07-02-26 조회 3,326
07-02-26 조회 3,031
07-02-23 조회 3,666
07-02-23 조회 3,633
07-02-22 조회 4,015
07-02-22 조회 3,822
07-02-19 조회 3,849
07-02-17 조회 4,864
07-02-14 조회 8,168
07-02-12 조회 3,940
07-02-10 조회 3,557
07-02-02 조회 3,805
07-01-31 조회 3,481
07-01-29 조회 3,335
07-01-25 조회 5,117
07-01-21 조회 3,261
07-01-19 조회 3,047
06-12-15 조회 4,055
06-12-15 조회 4,466
06-12-15 조회 2,949
06-12-15 조회 4,499
06-12-15 조회 3,389
06-12-15 조회 4,096
06-12-15 조회 3,039
06-12-15 조회 2,767
06-12-15 조회 4,633
06-12-15 조회 3,175
06-12-15 조회 3,280
06-12-07 조회 4,727
06-12-07 조회 4,014
06-12-04 조회 4,657
06-11-27 조회 3,702
06-11-21 조회 4,017
06-11-15 조회 3,445
06-11-04 조회 3,336
06-10-29 조회 3,993
06-10-13 조회 3,849
06-10-13 조회 4,220
06-10-13 조회 4,174
06-10-12 조회 5,366
06-10-12 조회 4,280
06-10-04 조회 3,778
06-10-02 조회 4,562
06-09-29 조회 3,048
06-09-26 조회 3,390
06-09-26 조회 3,651
06-09-26 조회 3,297
06-09-26 조회 3,445
06-09-26 조회 4,349
06-09-25 조회 4,651
06-09-22 조회 4,994
06-09-22 조회 3,559
06-09-21 조회 4,334
06-09-21 조회 4,337
06-09-21 조회 3,545
06-09-21 조회 5,194
06-09-21 조회 3,724
06-09-21 조회 3,456
06-09-20 조회 3,028
06-09-15 조회 3,154
06-09-13 조회 3,470
06-09-11 조회 3,284