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건
+
제목 글쓴이 날짜 조회
07-07-30 조회 5,133
07-07-30 조회 5,598
07-07-30 조회 5,518
07-07-29 조회 3,930
07-07-29 조회 3,663
07-07-29 조회 4,608
07-07-29 조회 4,468
07-07-28 조회 4,674
07-07-26 조회 4,586
07-07-25 조회 6,237
07-07-24 조회 6,496
07-07-21 조회 4,609
07-07-21 조회 3,963
07-07-21 조회 4,173
07-07-21 조회 3,481
07-07-21 조회 3,320
07-07-21 조회 3,264
07-07-20 조회 4,368
07-07-20 조회 3,513
07-07-20 조회 3,588
07-07-20 조회 3,259
07-07-20 조회 3,717
07-07-20 조회 4,451
07-07-18 조회 5,434
07-07-18 조회 4,634
07-07-16 조회 3,230
07-07-16 조회 3,154
07-07-13 조회 4,131
07-07-12 조회 2,847
07-07-09 조회 3,240
07-07-07 조회 3,481
07-07-07 조회 3,382
07-07-07 조회 3,504
07-07-06 조회 5,319
07-07-06 조회 3,051
07-07-06 조회 5,738
07-07-06 조회 4,298
07-07-06 조회 3,481
07-07-06 조회 4,526
07-07-06 조회 4,144
07-07-05 조회 4,130
07-07-05 조회 6,884
07-07-04 조회 3,501
07-07-02 조회 4,656
07-06-30 조회 4,538
07-06-29 조회 4,939
07-06-29 조회 4,468
07-06-28 조회 3,654
07-06-23 조회 3,311
07-06-21 조회 3,773
07-06-20 조회 7,443
07-06-20 조회 4,052
07-06-20 조회 5,789
07-06-19 조회 3,243
07-06-19 조회 1.1만
07-06-17 조회 3,713
07-06-16 조회 2,814
07-06-15 조회 4,217
07-06-12 조회 4,176
07-06-11 조회 4,053
07-06-11 조회 3,344
07-06-05 조회 3,684
07-06-05 조회 4,241
07-06-05 조회 4,244
07-06-05 조회 5,356
07-06-04 조회 7,419
07-05-31 조회 3,324
07-05-30 조회 3,398
07-05-29 조회 3,092
07-05-29 조회 2,822
07-05-29 조회 3,834
07-05-29 조회 2,917
07-05-29 조회 2,729
07-05-29 조회 5,966
07-05-29 조회 2,982
07-05-29 조회 3,009
07-05-29 조회 3,021
07-05-29 조회 3,130
07-05-29 조회 4,820
07-05-29 조회 2,819
07-05-29 조회 2,682
07-05-29 조회 2,499
07-05-29 조회 3,051
07-05-29 조회 3,085
07-05-28 조회 5,015
07-05-26 조회 3,306
07-05-20 조회 4,333
07-05-18 조회 6,089
07-05-18 조회 4,130
07-05-17 조회 9,251
07-05-17 조회 5,288
07-05-17 조회 3,959
07-05-16 조회 2,701
07-05-16 조회 3,845
07-05-15 조회 6,272
07-05-14 조회 6,451
07-05-13 조회 3,289
07-05-11 조회 5,602
07-05-10 조회 5,343
07-05-10 조회 5,413