선언되지 않았습니다 문서에 US-ASCII 범위 밖의 문자가 포함되어있는 경우 일부 브라우저 구성에서 페이지의 문자 인코딩을 문서 또는 전송 프로토콜에서 선언해야합니다. "문자 인코딩은
insert.html :
<!DOCTYPE html PUBLIC"-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>insert page</title></head>
<body>
<h1> Insert Page </h1>
<form action="insert.php" method="post" enctype="application/x-www-form-urlencoded" >
<p>Title:<input type="text" name="title" size="40"/></p>
<p>Price:<input type= "text" name="price" size="40" /></p>
<p><input type="submit" value="Insert" />
<input type="reset" value="Reset" /></p>
</form>
</body>
</html>
insert.php : 내 코드에서 문제가 어디 있는지 모릅니다
<?php
$title = $_POST["title"];
$price = $_POST["price"];
echo $title;
?>
. 도와주세요.
좋은 독서 추가 : [HTML에서 문자 인코딩을 선언] (http://www.w3.org/International/questions/qa-html-encoding-declarations) –
를 .html 페이지를 .php :'insert.html' ->'insert.php'라고 이름을 붙이십시오. 그리고 폼 핸들링 파일 ('insert.php')을'insert_action.php' 또는 무엇인가로 명명하십시오. (PHP를 사용할 때'html'과'php' 페이지가 섞이지는 않을지 모르겠군요.) –
오, 이런, 낡은 질문이었습니다. 새로운 답변으로 인해 날짜를 확인하지 못했습니다 ... –