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,234
08-06-15 조회 2,473
08-06-14 조회 2,802
08-06-14 조회 3,709
08-06-14 조회 3,400
08-06-12 조회 2,273
08-06-11 조회 2,314
08-06-11 조회 2,406
08-06-11 조회 7,438
08-06-11 조회 7,171
08-06-08 조회 3,347
08-06-07 조회 2,277
08-06-05 조회 2,403
08-06-05 조회 3,366
08-06-05 조회 2,741
08-06-05 조회 2,389
08-06-05 조회 2,412
08-06-04 조회 2,331
08-06-03 조회 2,324
08-06-03 조회 5,397
08-06-03 조회 3,631
08-06-02 조회 2,933
08-06-02 조회 4,070
08-06-01 조회 2,681
08-05-31 조회 2,385
08-05-31 조회 2,396
08-05-31 조회 2,492
08-05-30 조회 2,370
08-05-29 조회 2,510
08-05-29 조회 3,783
08-05-27 조회 5,609
08-05-26 조회 2,453
08-05-26 조회 5,366
08-05-25 조회 5,453
08-05-24 조회 2,514
08-05-23 조회 3,520
08-05-23 조회 2,937
08-05-23 조회 4,688
08-05-22 조회 2,698
08-05-21 조회 5,039
08-05-21 조회 4,833
08-05-21 조회 3,976
08-05-20 조회 4,570
08-05-20 조회 4,147
08-05-20 조회 3,369
08-05-20 조회 4,646
08-05-20 조회 3,992
08-05-20 조회 4,885
08-05-19 조회 2,430
08-05-16 조회 3,548
08-05-15 조회 2,613
08-05-15 조회 2,444
08-05-15 조회 2,434
08-05-14 조회 2,380
08-05-13 조회 2,835
08-05-13 조회 4,241
08-05-13 조회 4,648
08-05-09 조회 4,421
08-05-08 조회 3,174
08-05-08 조회 5,330
08-05-08 조회 2,687
08-05-07 조회 2,384
08-05-07 조회 2,531
08-05-07 조회 2,332
08-05-01 조회 2,645
08-05-01 조회 2,994
08-04-29 조회 3,842
08-04-28 조회 3,662
08-04-26 조회 2,692
08-04-26 조회 2,436
08-04-26 조회 3,721
08-04-25 조회 4,142
08-04-23 조회 4,583
08-04-22 조회 4,541
08-04-22 조회 3,678
08-04-22 조회 5,258
08-04-22 조회 4,626
08-04-22 조회 7,013
08-04-22 조회 4,070
08-04-21 조회 3,219
08-04-21 조회 3,257
08-04-21 조회 3,194
08-04-21 조회 3,018
08-04-21 조회 4,124
08-04-20 조회 3,289
08-04-20 조회 2,970
08-04-20 조회 3,498
08-04-19 조회 2,399
08-04-18 조회 3,106
08-04-18 조회 4,441
08-04-17 조회 3,691
08-04-17 조회 3,146
08-04-17 조회 3,354
08-04-17 조회 2,641
08-04-17 조회 3,032
08-04-17 조회 2,513
08-04-17 조회 3,071
08-04-17 조회 3,129
08-04-17 조회 2,327
08-04-17 조회 4,623