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건
+
제목 글쓴이 날짜 조회
08-06-15 조회 3,229
08-06-15 조회 2,466
08-06-14 조회 2,795
08-06-14 조회 3,703
08-06-14 조회 3,391
08-06-12 조회 2,264
08-06-11 조회 2,304
08-06-11 조회 2,396
08-06-11 조회 7,431
08-06-11 조회 7,160
08-06-08 조회 3,339
08-06-07 조회 2,266
08-06-05 조회 2,395
08-06-05 조회 3,362
08-06-05 조회 2,733
08-06-05 조회 2,384
08-06-05 조회 2,408
08-06-04 조회 2,326
08-06-03 조회 2,320
08-06-03 조회 5,392
08-06-03 조회 3,625
08-06-02 조회 2,929
08-06-02 조회 4,068
08-06-01 조회 2,678
08-05-31 조회 2,380
08-05-31 조회 2,393
08-05-31 조회 2,485
08-05-30 조회 2,360
08-05-29 조회 2,505
08-05-29 조회 3,777
08-05-27 조회 5,607
08-05-26 조회 2,447
08-05-26 조회 5,359
08-05-25 조회 5,445
08-05-24 조회 2,510
08-05-23 조회 3,515
08-05-23 조회 2,935
08-05-23 조회 4,687
08-05-22 조회 2,694
08-05-21 조회 5,037
08-05-21 조회 4,827
08-05-21 조회 3,970
08-05-20 조회 4,566
08-05-20 조회 4,144
08-05-20 조회 3,365
08-05-20 조회 4,644
08-05-20 조회 3,991
08-05-20 조회 4,883
08-05-19 조회 2,422
08-05-16 조회 3,546
08-05-15 조회 2,608
08-05-15 조회 2,442
08-05-15 조회 2,427
08-05-14 조회 2,374
08-05-13 조회 2,833
08-05-13 조회 4,236
08-05-13 조회 4,644
08-05-09 조회 4,416
08-05-08 조회 3,173
08-05-08 조회 5,328
08-05-08 조회 2,682
08-05-07 조회 2,379
08-05-07 조회 2,528
08-05-07 조회 2,328
08-05-01 조회 2,641
08-05-01 조회 2,992
08-04-29 조회 3,842
08-04-28 조회 3,661
08-04-26 조회 2,688
08-04-26 조회 2,434
08-04-26 조회 3,715
08-04-25 조회 4,139
08-04-23 조회 4,580
08-04-22 조회 4,539
08-04-22 조회 3,677
08-04-22 조회 5,251
08-04-22 조회 4,624
08-04-22 조회 7,008
08-04-22 조회 4,065
08-04-21 조회 3,214
08-04-21 조회 3,253
08-04-21 조회 3,190
08-04-21 조회 3,016
08-04-21 조회 4,122
08-04-20 조회 3,287
08-04-20 조회 2,965
08-04-20 조회 3,491
08-04-19 조회 2,392
08-04-18 조회 3,101
08-04-18 조회 4,436
08-04-17 조회 3,689
08-04-17 조회 3,139
08-04-17 조회 3,350
08-04-17 조회 2,633
08-04-17 조회 3,027
08-04-17 조회 2,508
08-04-17 조회 3,067
08-04-17 조회 3,126
08-04-17 조회 2,317
08-04-17 조회 4,614