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,379
08-06-15 조회 3,128
08-06-15 조회 2,351
08-06-14 조회 2,686
08-06-14 조회 3,580
08-06-14 조회 3,289
08-06-12 조회 2,171
08-06-11 조회 2,205
08-06-11 조회 2,296
08-06-11 조회 7,330
08-06-11 조회 7,060
08-06-08 조회 3,247
08-06-07 조회 2,185
08-06-05 조회 2,304
08-06-05 조회 3,283
08-06-05 조회 2,651
08-06-05 조회 2,309
08-06-05 조회 2,336
08-06-04 조회 2,258
08-06-03 조회 2,247
08-06-03 조회 5,319
08-06-03 조회 3,550
08-06-02 조회 2,848
08-06-02 조회 3,986
08-06-01 조회 2,606
08-05-31 조회 2,298
08-05-31 조회 2,323
08-05-31 조회 2,405
08-05-30 조회 2,285
08-05-29 조회 2,421
08-05-29 조회 3,676
08-05-27 조회 5,507
08-05-26 조회 2,351
08-05-26 조회 5,266
08-05-25 조회 5,333
08-05-24 조회 2,408
08-05-23 조회 3,411
08-05-23 조회 2,822
08-05-23 조회 4,562
08-05-22 조회 2,588
08-05-21 조회 4,927
08-05-21 조회 4,716
08-05-21 조회 3,870
08-05-20 조회 4,463
08-05-20 조회 4,048
08-05-20 조회 3,284
08-05-20 조회 4,554
08-05-20 조회 3,902
08-05-20 조회 4,789
08-05-19 조회 2,321
08-05-16 조회 3,453
08-05-15 조회 2,519
08-05-15 조회 2,355
08-05-15 조회 2,345
08-05-14 조회 2,262
08-05-13 조회 2,719
08-05-13 조회 4,112
08-05-13 조회 4,550
08-05-09 조회 4,328
08-05-08 조회 3,075
08-05-08 조회 5,238
08-05-08 조회 2,604
08-05-07 조회 2,309
08-05-07 조회 2,463
08-05-07 조회 2,272
08-05-01 조회 2,585
08-05-01 조회 2,936
08-04-29 조회 3,779
08-04-28 조회 3,592
08-04-26 조회 2,604
08-04-26 조회 2,341
08-04-26 조회 3,599
08-04-25 조회 4,030
08-04-23 조회 4,468
08-04-22 조회 4,404
08-04-22 조회 3,549
08-04-22 조회 5,105
08-04-22 조회 4,483
08-04-22 조회 6,853
08-04-22 조회 3,933
08-04-21 조회 3,069
08-04-21 조회 3,134
08-04-21 조회 3,087
08-04-21 조회 2,925
08-04-21 조회 4,041
08-04-20 조회 3,198
08-04-20 조회 2,891
08-04-20 조회 3,414
08-04-19 조회 2,315
08-04-18 조회 3,013
08-04-18 조회 4,327
08-04-17 조회 3,564
08-04-17 조회 3,013
08-04-17 조회 3,243
08-04-17 조회 2,514
08-04-17 조회 2,919
08-04-17 조회 2,402
08-04-17 조회 2,963
08-04-17 조회 3,015
08-04-17 조회 2,212