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,689
17년 전 조회 3,950
17년 전 조회 3,734
17년 전 조회 2,908
17년 전 조회 3,271
17년 전 조회 2,985
17년 전 조회 2,282
17년 전 조회 3,637
17년 전 조회 2,982
17년 전 조회 3,858
17년 전 조회 1,485
17년 전 조회 2,591
17년 전 조회 1,658
17년 전 조회 1,518
17년 전 조회 1,395
17년 전 조회 1,386
17년 전 조회 1,751
17년 전 조회 3,180
17년 전 조회 3,576
17년 전 조회 3,337
17년 전 조회 2,217
17년 전 조회 4,336
17년 전 조회 1,721
17년 전 조회 1,456
17년 전 조회 1,578
17년 전 조회 1,437
17년 전 조회 1,680
17년 전 조회 2,057
17년 전 조회 2,662
17년 전 조회 2,733
17년 전 조회 1,751
17년 전 조회 1,502
17년 전 조회 2,756
17년 전 조회 3,197
17년 전 조회 3,557
17년 전 조회 3,496
17년 전 조회 2,662
17년 전 조회 4,086
17년 전 조회 3,514
17년 전 조회 5,816
17년 전 조회 2,986
17년 전 조회 2,184
17년 전 조회 2,273
17년 전 조회 2,098
17년 전 조회 2,044
17년 전 조회 3,109
17년 전 조회 2,214
17년 전 조회 1,871
17년 전 조회 2,394
17년 전 조회 1,441
17년 전 조회 1,992
17년 전 조회 3,221
17년 전 조회 2,472
17년 전 조회 2,118
17년 전 조회 2,343
17년 전 조회 1,646
17년 전 조회 2,047
17년 전 조회 1,553
17년 전 조회 2,084
17년 전 조회 2,116
17년 전 조회 1,356
17년 전 조회 3,448
17년 전 조회 4,633
17년 전 조회 2,782
17년 전 조회 7,796
17년 전 조회 4,160
17년 전 조회 4,480
17년 전 조회 2,734
17년 전 조회 3,234
17년 전 조회 3,967
17년 전 조회 4,308
17년 전 조회 3,492
17년 전 조회 3,487
17년 전 조회 3,615
17년 전 조회 2,774
17년 전 조회 2,371
17년 전 조회 3,419
17년 전 조회 3,582
17년 전 조회 4,907
17년 전 조회 1,910
17년 전 조회 2,934
17년 전 조회 3,009
17년 전 조회 2,236
17년 전 조회 2,521
17년 전 조회 2,152
17년 전 조회 2,715
17년 전 조회 4,108
17년 전 조회 4,196
17년 전 조회 2,406
17년 전 조회 1,658
17년 전 조회 1,787
17년 전 조회 1,940
17년 전 조회 1,926
17년 전 조회 1,681
17년 전 조회 1,825
17년 전 조회 1,643
17년 전 조회 2,131
17년 전 조회 3,066
17년 전 조회 2,142
17년 전 조회 1,690