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,188건
+
제목 글쓴이 날짜 조회
08-06-19 조회 2,384
08-06-15 조회 3,135
08-06-15 조회 2,357
08-06-14 조회 2,694
08-06-14 조회 3,592
08-06-14 조회 3,293
08-06-12 조회 2,180
08-06-11 조회 2,213
08-06-11 조회 2,301
08-06-11 조회 7,335
08-06-11 조회 7,063
08-06-08 조회 3,254
08-06-07 조회 2,190
08-06-05 조회 2,307
08-06-05 조회 3,287
08-06-05 조회 2,655
08-06-05 조회 2,314
08-06-05 조회 2,341
08-06-04 조회 2,260
08-06-03 조회 2,251
08-06-03 조회 5,322
08-06-03 조회 3,555
08-06-02 조회 2,859
08-06-02 조회 3,992
08-06-01 조회 2,611
08-05-31 조회 2,302
08-05-31 조회 2,325
08-05-31 조회 2,408
08-05-30 조회 2,288
08-05-29 조회 2,426
08-05-29 조회 3,682
08-05-27 조회 5,512
08-05-26 조회 2,361
08-05-26 조회 5,277
08-05-25 조회 5,341
08-05-24 조회 2,413
08-05-23 조회 3,415
08-05-23 조회 2,827
08-05-23 조회 4,577
08-05-22 조회 2,594
08-05-21 조회 4,935
08-05-21 조회 4,723
08-05-21 조회 3,875
08-05-20 조회 4,468
08-05-20 조회 4,058
08-05-20 조회 3,288
08-05-20 조회 4,559
08-05-20 조회 3,909
08-05-20 조회 4,793
08-05-19 조회 2,327
08-05-16 조회 3,460
08-05-15 조회 2,525
08-05-15 조회 2,359
08-05-15 조회 2,350
08-05-14 조회 2,275
08-05-13 조회 2,728
08-05-13 조회 4,120
08-05-13 조회 4,561
08-05-09 조회 4,337
08-05-08 조회 3,084
08-05-08 조회 5,240
08-05-08 조회 2,611
08-05-07 조회 2,314
08-05-07 조회 2,469
08-05-07 조회 2,274
08-05-01 조회 2,588
08-05-01 조회 2,939
08-04-29 조회 3,783
08-04-28 조회 3,598
08-04-26 조회 2,607
08-04-26 조회 2,349
08-04-26 조회 3,607
08-04-25 조회 4,036
08-04-23 조회 4,476
08-04-22 조회 4,412
08-04-22 조회 3,554
08-04-22 조회 5,116
08-04-22 조회 4,492
08-04-22 조회 6,867
08-04-22 조회 3,946
08-04-21 조회 3,079
08-04-21 조회 3,139
08-04-21 조회 3,091
08-04-21 조회 2,928
08-04-21 조회 4,044
08-04-20 조회 3,202
08-04-20 조회 2,895
08-04-20 조회 3,417
08-04-19 조회 2,319
08-04-18 조회 3,017
08-04-18 조회 4,335
08-04-17 조회 3,572
08-04-17 조회 3,022
08-04-17 조회 3,247
08-04-17 조회 2,517
08-04-17 조회 2,921
08-04-17 조회 2,406
08-04-17 조회 2,968
08-04-17 조회 3,021
08-04-17 조회 2,221