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건
+
제목 글쓴이 날짜 조회
07-05-09 조회 3,520
07-05-09 조회 5,466
07-05-09 조회 3,551
07-05-09 조회 4,607
07-05-09 조회 6,157
07-05-08 조회 3,208
07-05-08 조회 4,574
07-05-08 조회 2,900
07-05-08 조회 3,942
07-05-07 조회 2,958
07-05-05 조회 3,994
07-05-04 조회 3,816
07-05-04 조회 2,813
07-05-04 조회 2,753
07-05-04 조회 2,979
07-05-04 조회 3,555
07-05-04 조회 3,317
07-05-04 조회 3,650
07-05-04 조회 6,244
07-05-04 조회 3,010
07-05-04 조회 2,435
07-05-04 조회 2,540
07-05-04 조회 2,515
07-05-04 조회 2,258
07-05-04 조회 2,214
07-05-04 조회 2,569
07-05-04 조회 2,545
07-05-04 조회 3,500
07-05-04 조회 2,414
07-05-04 조회 2,805
07-05-04 조회 3,323
07-05-04 조회 2,454
07-05-04 조회 4,040
07-05-04 조회 2,506
07-05-04 조회 2,889
07-05-04 조회 2,706
07-05-04 조회 2,614
07-05-04 조회 2,443
07-05-04 조회 2,287
07-05-04 조회 2,909
07-05-04 조회 2,294
07-05-04 조회 4,883
07-05-04 조회 2,936
07-05-02 조회 3,027
07-05-02 조회 2,339
07-05-02 조회 3,060
07-05-02 조회 2,290
07-05-02 조회 2,351
07-05-02 조회 2,196
07-05-02 조회 2,160
07-05-02 조회 2,254
07-05-02 조회 3,781
07-05-01 조회 2,733
07-05-01 조회 2,836
07-05-01 조회 2,401
07-05-01 조회 3,083
07-05-01 조회 2,729
07-05-01 조회 2,701
07-05-01 조회 2,917
07-05-01 조회 2,188
07-05-01 조회 2,629
07-05-01 조회 3,500
07-05-01 조회 2,354
07-05-01 조회 2,532
07-05-01 조회 2,764
07-05-01 조회 2,371
07-05-01 조회 2,176
07-05-01 조회 2,382
07-05-01 조회 2,729
07-05-01 조회 2,851
07-05-01 조회 2,785
07-05-01 조회 2,405
07-04-30 조회 9,898
07-04-30 조회 3,214
07-04-30 조회 2,742
07-04-30 조회 2,706
07-04-30 조회 3,048
07-04-30 조회 3,137
07-04-30 조회 2,471
07-04-30 조회 2,212
07-04-30 조회 4,030
07-04-30 조회 4,418
07-04-30 조회 3,468
07-04-30 조회 2,871
07-04-30 조회 2,686
07-04-30 조회 2,121
07-04-28 조회 3,057
07-04-28 조회 6,594
07-04-27 조회 4,164
07-04-27 조회 3,504
07-04-27 조회 4,397
07-04-26 조회 3,804
07-04-26 조회 3,504
07-04-26 조회 5,814
07-04-26 조회 4,811
07-04-25 조회 4,818
07-04-25 조회 5,351
07-04-25 조회 3,234
07-04-22 조회 3,006
07-04-22 조회 3,007