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"];
로 변경해서 한번 해보세요.
서버관리자에게 연락하세요
@ 하고 $ 띄우신거 아니죠?
댓글을 작성하시려면 로그인이 필요합니다.

프로그램

+
제목 글쓴이 날짜 조회
17년 전 조회 1,686
17년 전 조회 3,945
17년 전 조회 3,733
17년 전 조회 2,907
17년 전 조회 3,269
17년 전 조회 2,979
17년 전 조회 2,278
17년 전 조회 3,636
17년 전 조회 2,980
17년 전 조회 3,855
17년 전 조회 1,484
17년 전 조회 2,585
17년 전 조회 1,655
17년 전 조회 1,516
17년 전 조회 1,394
17년 전 조회 1,383
17년 전 조회 1,747
17년 전 조회 3,176
17년 전 조회 3,572
17년 전 조회 3,335
17년 전 조회 2,212
17년 전 조회 4,336
17년 전 조회 1,717
17년 전 조회 1,453
17년 전 조회 1,573
17년 전 조회 1,436
17년 전 조회 1,680
17년 전 조회 2,055
17년 전 조회 2,660
17년 전 조회 2,731
17년 전 조회 1,746
17년 전 조회 1,497
17년 전 조회 2,754
17년 전 조회 3,195
17년 전 조회 3,554
17년 전 조회 3,492
17년 전 조회 2,660
17년 전 조회 4,084
17년 전 조회 3,513
17년 전 조회 5,809
17년 전 조회 2,985
17년 전 조회 2,183
17년 전 조회 2,270
17년 전 조회 2,092
17년 전 조회 2,037
17년 전 조회 3,103
17년 전 조회 2,209
17년 전 조회 1,867
17년 전 조회 2,390
17년 전 조회 1,439
17년 전 조회 1,991
17년 전 조회 3,218
17년 전 조회 2,467
17년 전 조회 2,116
17년 전 조회 2,337
17년 전 조회 1,643
17년 전 조회 2,044
17년 전 조회 1,550
17년 전 조회 2,080
17년 전 조회 2,115
17년 전 조회 1,352
17년 전 조회 3,446
17년 전 조회 4,628
17년 전 조회 2,781
17년 전 조회 7,794
17년 전 조회 4,155
17년 전 조회 4,476
17년 전 조회 2,729
17년 전 조회 3,231
17년 전 조회 3,965
17년 전 조회 4,306
17년 전 조회 3,488
17년 전 조회 3,483
17년 전 조회 3,609
17년 전 조회 2,772
17년 전 조회 2,370
17년 전 조회 3,416
17년 전 조회 3,579
17년 전 조회 4,906
17년 전 조회 1,909
17년 전 조회 2,931
17년 전 조회 3,004
17년 전 조회 2,230
17년 전 조회 2,518
17년 전 조회 2,149
17년 전 조회 2,711
17년 전 조회 4,104
17년 전 조회 4,194
17년 전 조회 2,405
17년 전 조회 1,652
17년 전 조회 1,786
17년 전 조회 1,936
17년 전 조회 1,921
17년 전 조회 1,679
17년 전 조회 1,824
17년 전 조회 1,640
17년 전 조회 2,130
17년 전 조회 3,063
17년 전 조회 2,138
17년 전 조회 1,687