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-17 조회 5,660
08-04-17 조회 3,807
08-04-17 조회 8,789
08-04-17 조회 5,274
08-04-17 조회 5,483
08-04-17 조회 3,725
08-04-17 조회 4,472
08-04-17 조회 5,007
08-04-17 조회 5,371
08-04-17 조회 4,594
08-04-17 조회 4,590
08-04-17 조회 4,720
08-04-17 조회 3,798
08-04-17 조회 3,373
08-04-17 조회 4,382
08-04-17 조회 4,633
08-04-17 조회 6,043
08-04-17 조회 2,855
08-04-17 조회 4,026
08-04-17 조회 4,044
08-04-17 조회 3,251
08-04-17 조회 3,581
08-04-17 조회 3,190
08-04-17 조회 3,672
08-04-17 조회 5,046
08-04-17 조회 5,186
08-04-17 조회 3,391
08-04-16 조회 2,541
08-04-15 조회 2,673
08-04-14 조회 2,824
08-04-14 조회 2,811
08-04-11 조회 2,591
08-04-11 조회 2,719
08-04-11 조회 2,542
08-04-09 조회 3,149
08-04-08 조회 4,175
08-04-07 조회 3,086
08-04-07 조회 2,653
08-04-06 조회 2,921
08-04-06 조회 3,630
08-04-05 조회 3,206
08-04-05 조회 2,466
08-04-04 조회 7,270
08-04-04 조회 4,653
08-04-04 조회 4,559
08-04-04 조회 3,893
08-04-04 조회 4,090
08-04-04 조회 4,103
08-04-04 조회 4,559
08-04-04 조회 3,759
08-04-04 조회 3,899
08-04-04 조회 4,000
08-04-04 조회 3,931
08-04-04 조회 4,110
08-04-04 조회 4,654
08-04-04 조회 4,059
08-04-04 조회 2,895
08-04-04 조회 4,274
08-04-04 조회 2,980
08-04-04 조회 2,874
08-04-04 조회 3,375
08-04-04 조회 2,902
08-04-04 조회 2,778
08-04-04 조회 2,757
08-04-04 조회 2,983
08-04-04 조회 3,444
08-04-04 조회 2,787
08-04-04 조회 2,804
08-04-04 조회 2,628
08-04-04 조회 2,806
08-04-04 조회 2,635
08-04-04 조회 2,698
08-04-04 조회 3,019
08-04-04 조회 2,855
08-04-04 조회 2,718
08-04-04 조회 2,677
08-04-04 조회 2,764
08-04-04 조회 2,592
08-04-04 조회 2,627
08-04-04 조회 2,663
08-04-04 조회 2,728
08-04-04 조회 2,752
08-04-04 조회 2,838
08-04-04 조회 2,750
08-04-04 조회 3,109
08-04-04 조회 4,236
08-04-03 조회 4,664
08-04-03 조회 2,753
08-04-03 조회 2,892
08-04-03 조회 2,674
08-04-03 조회 3,535
08-04-03 조회 4,365
08-04-03 조회 2,639
08-04-03 조회 2,554
08-04-03 조회 2,802
08-04-03 조회 2,732
08-04-03 조회 2,891
08-04-03 조회 2,864
08-04-03 조회 2,749
08-04-03 조회 3,997