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건
+
제목 글쓴이 날짜 조회
10-09-25 조회 2,735
10-09-19 조회 2,772
10-09-15 조회 2,769
10-09-15 조회 4,176
10-09-15 조회 3,406
10-09-15 조회 2,504
10-09-07 조회 3,625
10-08-27 조회 4,077
10-06-11 조회 4,262
10-05-31 조회 2,505
10-02-27 조회 5,021
10-02-09 조회 3,769
09-10-10 조회 7,355
09-03-19 조회 3,218
09-02-09 조회 3,491
09-02-09 조회 4,544
08-11-01 조회 2,927
08-09-29 조회 4,576
08-09-26 조회 3,524
08-09-26 조회 3,596
08-09-26 조회 2,731
08-09-26 조회 3,776
08-09-26 조회 3,504
08-09-26 조회 4,269
08-09-18 조회 3,601
08-09-09 조회 3,243
08-08-28 조회 2,784
08-07-06 조회 3,554
08-05-21 조회 4,716
08-05-13 조회 4,553
08-04-17 조회 4,931
08-02-19 조회 3,551
08-01-18 조회 3,859
08-01-10 조회 3,832
07-10-22 조회 3,662
07-10-09 조회 4,319
07-10-03 조회 3,529
07-07-06 조회 4,225
07-07-06 조회 4,436
07-07-06 조회 4,044
07-06-28 조회 3,585
07-06-05 조회 3,591
07-06-05 조회 4,134
07-05-30 조회 3,303
07-05-02 조회 3,692
07-04-15 조회 5,166
07-04-11 조회 3,644
07-04-05 조회 3,945
07-03-31 조회 3,162
07-03-31 조회 4,138
07-03-30 조회 3,747
07-03-24 조회 4,013
07-03-22 조회 3,670
07-03-12 조회 4,422
07-02-16 조회 3,287
07-02-14 조회 5,174
07-02-10 조회 4,009
07-02-09 조회 4,398
07-01-19 조회 4,061
07-01-16 조회 4,988
06-12-16 조회 5,856
06-11-30 조회 3,608
06-11-25 조회 3,716
06-10-15 조회 5,080
06-09-26 조회 5,325
06-09-26 조회 5,437
06-09-22 조회 4,288
06-09-21 조회 3,558
06-09-21 조회 3,654
06-09-02 조회 3,498
06-08-08 조회 5,130
06-07-20 조회 3,744
06-07-17 조회 3,374
06-07-13 조회 4,196
06-07-11 조회 3,490
06-07-11 조회 3,497
06-07-11 조회 3,860
06-06-29 조회 6,080
06-06-19 조회 6,474
06-06-02 조회 3,523
06-05-24 조회 5,006
06-05-14 조회 7,791
06-05-08 조회 3,916
06-02-02 조회 5,470
05-12-16 조회 4,525
05-12-05 조회 5,176
05-06-28 조회 4,135
05-04-11 조회 4,084
05-04-11 조회 4,263
05-04-11 조회 3,334
05-03-13 조회 3,235
05-03-12 조회 4,309
04-12-08 조회 7,792
04-12-01 조회 5,208
04-11-28 조회 3,379
04-11-28 조회 3,220
04-08-05 조회 5,637
04-08-05 조회 4,986
04-08-05 조회 5,597