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,420
08-06-15 조회 3,170
08-06-15 조회 2,407
08-06-14 조회 2,745
08-06-14 조회 3,635
08-06-14 조회 3,334
08-06-12 조회 2,214
08-06-11 조회 2,241
08-06-11 조회 2,338
08-06-11 조회 7,372
08-06-11 조회 7,107
08-06-08 조회 3,289
08-06-07 조회 2,218
08-06-05 조회 2,342
08-06-05 조회 3,319
08-06-05 조회 2,682
08-06-05 조회 2,342
08-06-05 조회 2,365
08-06-04 조회 2,286
08-06-03 조회 2,281
08-06-03 조회 5,359
08-06-03 조회 3,591
08-06-02 조회 2,891
08-06-02 조회 4,028
08-06-01 조회 2,643
08-05-31 조회 2,344
08-05-31 조회 2,356
08-05-31 조회 2,436
08-05-30 조회 2,312
08-05-29 조회 2,457
08-05-29 조회 3,717
08-05-27 조회 5,561
08-05-26 조회 2,398
08-05-26 조회 5,309
08-05-25 조회 5,395
08-05-24 조회 2,458
08-05-23 조회 3,471
08-05-23 조회 2,871
08-05-23 조회 4,637
08-05-22 조회 2,633
08-05-21 조회 4,987
08-05-21 조회 4,761
08-05-21 조회 3,910
08-05-20 조회 4,509
08-05-20 조회 4,098
08-05-20 조회 3,324
08-05-20 조회 4,589
08-05-20 조회 3,940
08-05-20 조회 4,833
08-05-19 조회 2,367
08-05-16 조회 3,494
08-05-15 조회 2,554
08-05-15 조회 2,393
08-05-15 조회 2,384
08-05-14 조회 2,317
08-05-13 조회 2,771
08-05-13 조회 4,176
08-05-13 조회 4,603
08-05-09 조회 4,372
08-05-08 조회 3,127
08-05-08 조회 5,281
08-05-08 조회 2,634
08-05-07 조회 2,334
08-05-07 조회 2,483
08-05-07 조회 2,288
08-05-01 조회 2,610
08-05-01 조회 2,964
08-04-29 조회 3,806
08-04-28 조회 3,626
08-04-26 조회 2,638
08-04-26 조회 2,384
08-04-26 조회 3,650
08-04-25 조회 4,078
08-04-23 조회 4,517
08-04-22 조회 4,453
08-04-22 조회 3,614
08-04-22 조회 5,172
08-04-22 조회 4,552
08-04-22 조회 6,929
08-04-22 조회 4,000
08-04-21 조회 3,141
08-04-21 조회 3,191
08-04-21 조회 3,131
08-04-21 조회 2,963
08-04-21 조회 4,072
08-04-20 조회 3,236
08-04-20 조회 2,921
08-04-20 조회 3,453
08-04-19 조회 2,351
08-04-18 조회 3,056
08-04-18 조회 4,401
08-04-17 조회 3,620
08-04-17 조회 3,068
08-04-17 조회 3,285
08-04-17 조회 2,570
08-04-17 조회 2,971
08-04-17 조회 2,451
08-04-17 조회 3,007
08-04-17 조회 3,063
08-04-17 조회 2,269