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-04-03 조회 2,787
08-04-02 조회 2,988
08-04-02 조회 2,859
08-04-02 조회 3,174
08-04-02 조회 3,135
08-04-02 조회 3,165
08-04-02 조회 3,109
08-04-02 조회 2,809
08-04-02 조회 2,807
08-04-02 조회 2,914
08-04-02 조회 3,213
08-04-02 조회 3,100
08-04-02 조회 2,882
08-04-02 조회 3,028
08-04-02 조회 2,695
08-04-02 조회 2,950
08-04-02 조회 3,273
08-04-02 조회 4,070
08-04-02 조회 3,267
08-03-31 조회 2,566
08-03-31 조회 3,133
08-03-31 조회 3,630
08-03-29 조회 2,761
08-03-28 조회 3,465
08-03-28 조회 2,965
08-03-28 조회 2,635
08-03-27 조회 2,465
08-03-26 조회 3,366
08-03-26 조회 4,326
08-03-25 조회 3,798
08-03-25 조회 2,807
08-03-25 조회 4,127
08-03-25 조회 3,634
08-03-25 조회 4,057
08-03-25 조회 4,080
08-03-25 조회 3,743
08-03-25 조회 3,641
08-03-25 조회 2,897
08-03-25 조회 3,647
08-03-25 조회 5,347
08-03-21 조회 3,013
08-03-19 조회 5,179
08-03-18 조회 3,032
08-03-16 조회 2,992
08-03-14 조회 3,314
08-03-13 조회 3,704
08-03-13 조회 2,685
08-03-11 조회 3,012
08-03-11 조회 3,562
08-03-11 조회 3,050
08-03-11 조회 3,013
08-03-11 조회 2,807
08-03-11 조회 2,649
08-03-11 조회 2,592
08-03-11 조회 2,404
08-03-11 조회 2,413
08-03-11 조회 2,467
08-03-11 조회 2,445
08-03-11 조회 2,848
08-03-11 조회 2,923
08-03-08 조회 3,147
08-03-07 조회 4,262
08-03-07 조회 3,369
08-03-07 조회 3,028
08-03-06 조회 3,367
08-03-06 조회 3,121
08-03-06 조회 4,804
08-03-05 조회 2,743
08-03-04 조회 2,884
08-03-04 조회 2,587
08-03-04 조회 3,447
08-03-03 조회 4,422
08-02-28 조회 3,509
08-02-27 조회 3,002
08-02-22 조회 4,322
08-02-22 조회 5,701
08-02-22 조회 2,967
08-02-21 조회 4,644
08-02-21 조회 2,867
08-02-21 조회 4,866
08-02-21 조회 7,146
08-02-21 조회 2,656
08-02-21 조회 3,421
08-02-20 조회 3,091
08-02-19 조회 2,759
08-02-19 조회 3,615
08-02-19 조회 3,829
08-02-15 조회 2,789
08-02-15 조회 3,982
08-02-14 조회 4,485
08-02-14 조회 2,683
08-02-12 조회 3,138
08-02-11 조회 5,137
08-02-09 조회 5,877
08-02-09 조회 3,066
08-02-08 조회 2,924
08-02-05 조회 3,938
08-02-04 조회 3,139
08-02-03 조회 5,426
08-02-03 조회 2,835