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,745
17년 전 조회 4,014
17년 전 조회 3,789
17년 전 조회 2,968
17년 전 조회 3,336
17년 전 조회 3,044
17년 전 조회 2,353
17년 전 조회 3,704
17년 전 조회 3,036
17년 전 조회 3,912
17년 전 조회 1,534
17년 전 조회 2,647
17년 전 조회 1,720
17년 전 조회 1,577
17년 전 조회 1,457
17년 전 조회 1,439
17년 전 조회 1,801
17년 전 조회 3,247
17년 전 조회 3,630
17년 전 조회 3,397
17년 전 조회 2,275
17년 전 조회 4,391
17년 전 조회 1,784
17년 전 조회 1,520
17년 전 조회 1,637
17년 전 조회 1,489
17년 전 조회 1,741
17년 전 조회 2,120
17년 전 조회 2,716
17년 전 조회 2,790
17년 전 조회 1,803
17년 전 조회 1,561
17년 전 조회 2,808
17년 전 조회 3,245
17년 전 조회 3,605
17년 전 조회 3,549
17년 전 조회 2,728
17년 전 조회 4,137
17년 전 조회 3,569
17년 전 조회 5,878
17년 전 조회 3,035
17년 전 조회 2,236
17년 전 조회 2,314
17년 전 조회 2,153
17년 전 조회 2,100
17년 전 조회 3,164
17년 전 조회 2,275
17년 전 조회 1,929
17년 전 조회 2,458
17년 전 조회 1,499
17년 전 조회 2,062
17년 전 조회 3,291
17년 전 조회 2,525
17년 전 조회 2,175
17년 전 조회 2,401
17년 전 조회 1,710
17년 전 조회 2,112
17년 전 조회 1,604
17년 전 조회 2,142
17년 전 조회 2,171
17년 전 조회 1,420
17년 전 조회 3,508
17년 전 조회 4,691
17년 전 조회 2,837
17년 전 조회 7,851
17년 전 조회 4,211
17년 전 조회 4,532
17년 전 조회 2,789
17년 전 조회 3,295
17년 전 조회 4,019
17년 전 조회 4,363
17년 전 조회 3,547
17년 전 조회 3,543
17년 전 조회 3,675
17년 전 조회 2,820
17년 전 조회 2,433
17년 전 조회 3,475
17년 전 조회 3,647
17년 전 조회 4,966
17년 전 조회 1,969
17년 전 조회 2,981
17년 전 조회 3,066
17년 전 조회 2,294
17년 전 조회 2,572
17년 전 조회 2,213
17년 전 조회 2,769
17년 전 조회 4,173
17년 전 조회 4,248
17년 전 조회 2,457
17년 전 조회 1,709
17년 전 조회 1,837
17년 전 조회 1,998
17년 전 조회 1,975
17년 전 조회 1,742
17년 전 조회 1,883
17년 전 조회 1,706
17년 전 조회 2,196
17년 전 조회 3,127
17년 전 조회 2,206
17년 전 조회 1,754