-1
在PHP中,如何回顯textarea的值?我下面的代碼不起作用。如何從文本區回顯數據
<form name="code_editor" action="index.php" method="post">
<textarea name="code" rows="8" cols="80"></textarea>
<input type="submit" value="Upload">
</form>
我這個名爲「的index.php」和上面的代碼單獨的文件中是index.html,
<?php
echo $_POST['code_editor'];
?>
該字段的名稱屬性意味着被稱爲獲取有關該字段的數據。順便說一句,你不需要命名你的表格。我的建議並沒有在同一個網站上列出index.html和index.php。 –