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-10-19 조회 3,478
07-10-19 조회 3,239
07-10-19 조회 3,189
07-10-19 조회 2,890
07-10-19 조회 4,464
07-10-19 조회 5,830
07-10-19 조회 6,110
07-10-19 조회 3,503
07-10-19 조회 4,963
07-10-17 조회 4,614
07-10-17 조회 6,002
07-10-16 조회 4,625
07-10-15 조회 5,583
07-10-13 조회 5,264
07-10-09 조회 4,962
07-10-09 조회 4,299
07-10-09 조회 4,229
07-10-09 조회 4,787
07-10-09 조회 3,551
07-10-09 조회 3,330
07-10-09 조회 6,807
07-10-09 조회 3,957
07-10-09 조회 3,694
07-10-09 조회 4,015
07-10-09 조회 3,381
07-10-09 조회 4,429
07-10-08 조회 1.1만
07-10-05 조회 3,165
07-10-05 조회 4,090
07-10-03 조회 4,206
07-10-03 조회 3,411
07-10-03 조회 4,256
07-10-03 조회 5,270
07-10-03 조회 4,259
07-10-03 조회 3,657
07-10-03 조회 7,346
07-10-03 조회 4,929
07-10-03 조회 7,595
07-10-03 조회 3,692
07-10-03 조회 3,641
07-10-03 조회 3,639
07-10-03 조회 4,675
07-10-03 조회 4,630
07-10-03 조회 3,329
07-10-03 조회 5,186
07-10-03 조회 2,994
07-10-03 조회 2,661
07-10-03 조회 2,710
07-10-03 조회 2,922
07-10-03 조회 2,926
07-10-03 조회 4,745
07-10-02 조회 3,633
07-10-02 조회 3,165
07-10-02 조회 3,500
07-10-02 조회 5,807
07-10-02 조회 3,543
07-10-02 조회 4,165
07-10-02 조회 3,183
07-10-02 조회 4,848
07-10-02 조회 3,094
07-10-02 조회 8,928
07-10-02 조회 4,583
07-10-01 조회 2,544
07-10-01 조회 3,745
07-09-28 조회 4,770
07-09-28 조회 3,645
07-09-27 조회 3,542
07-09-27 조회 4,050
07-09-27 조회 5,095
07-09-27 조회 4,699
07-09-27 조회 3,837
07-09-27 조회 3,247
07-09-27 조회 3,294
07-09-27 조회 3,935
07-09-27 조회 3,261
07-09-15 조회 4,203
07-09-15 조회 2,921
07-09-13 조회 3,440
07-09-13 조회 2,959
07-09-13 조회 3,403
07-09-11 조회 3,631
07-09-09 조회 3,569
07-08-28 조회 3,507
07-08-28 조회 3,379
07-08-23 조회 4,687
07-08-22 조회 2,880
07-08-21 조회 4,664
07-08-21 조회 3,250
07-08-16 조회 6,517
07-08-07 조회 3,430
07-08-04 조회 3,553
07-08-04 조회 2,926
07-08-04 조회 3,336
07-08-04 조회 4,892
07-08-04 조회 2,739
07-08-04 조회 2,945
07-08-01 조회 5,577
07-08-01 조회 4,997
07-07-31 조회 4,463
07-07-31 조회 4,706