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건
+
제목 글쓴이 날짜 조회
09-10-03 조회 3,183
08-02-03 조회 3,487
08-02-03 조회 3,423
08-01-30 조회 4,937
08-01-29 조회 2,809
08-01-27 조회 3,943
08-01-27 조회 2,879
08-01-27 조회 3,157
08-01-26 조회 8,705
08-01-26 조회 3,256
08-01-24 조회 5,310
08-01-23 조회 3,654
08-01-21 조회 3,695
08-01-21 조회 3,439
08-01-21 조회 3,462
08-01-18 조회 3,975
08-01-18 조회 4,608
08-01-18 조회 6,774
08-01-18 조회 4,048
08-01-17 조회 4,039
08-01-17 조회 3,865
08-01-16 조회 3,120
08-01-15 조회 3,501
08-01-14 조회 6,756
08-01-12 조회 4,352
08-01-12 조회 3,916
08-01-12 조회 4,630
08-01-12 조회 3,871
08-01-12 조회 4,165
08-01-11 조회 7,197
08-01-10 조회 3,939
08-01-08 조회 3,473
08-01-08 조회 3,952
08-01-06 조회 2,739
08-01-04 조회 1.1만
08-01-02 조회 5,818
07-12-28 조회 4,753
07-12-24 조회 3,173
07-12-21 조회 4,870
07-12-17 조회 3,657
07-12-14 조회 5,025
07-12-13 조회 6,460
07-12-10 조회 5,105
07-12-10 조회 3,977
07-12-10 조회 4,374
07-12-08 조회 3,736
07-12-07 조회 4,070
07-12-07 조회 3,198
07-12-06 조회 4,945
07-12-04 조회 3,527
07-12-04 조회 3,667
07-12-03 조회 3,433
07-12-03 조회 4,457
07-12-02 조회 3,291
07-11-30 조회 4,032
07-11-30 조회 5,260
07-11-30 조회 5,859
07-11-29 조회 3,710
07-11-27 조회 4,168
07-11-27 조회 5,942
07-11-27 조회 4,042
07-11-26 조회 3,164
07-11-23 조회 4,623
07-11-23 조회 4,352
07-11-22 조회 5,258
07-11-21 조회 3,476
07-11-21 조회 3,603
07-11-21 조회 1.2만
07-11-20 조회 4,984
07-11-16 조회 4,841
07-11-13 조회 4,503
07-11-12 조회 4,229
07-11-10 조회 5,604
07-11-08 조회 6,769
07-11-08 조회 5,095
07-11-07 조회 4,569
07-11-07 조회 5,014
07-11-06 조회 3,563
07-11-06 조회 3,924
07-11-05 조회 5,258
07-11-02 조회 4,141
07-11-01 조회 5,607
07-10-31 조회 3,295
07-10-30 조회 3,764
07-10-29 조회 3,755
07-10-26 조회 5,073
07-10-25 조회 5,161
07-10-25 조회 3,941
07-10-24 조회 3,935
07-10-24 조회 4,253
07-10-24 조회 4,113
07-10-24 조회 3,387
07-10-24 조회 3,502
07-10-23 조회 6,145
07-10-23 조회 5,539
07-10-22 조회 4,272
07-10-22 조회 3,650
07-10-22 조회 4,187
07-10-22 조회 3,768
07-10-19 조회 4,824