如何在HTML文本区域中放置PHP值

如何在HTML文本区域中放置PHP值,php,html,textarea,Php,Html,Textarea,我正在尝试创建一个可以更新MySQL数据的页面。我希望“当前内容”已经在一个框中可见,以便可以更新。但是这个盒子太小了 我尝试过使用输入,但只在一行上有效,我想要更新的数据是一个很长的段落。我尝试使用textarea,但似乎不起作用 <input type="text" name="comment" value="<?php echo $currentCategory['comment']; ?>" /> <input type="submit" name="s

我正在尝试创建一个可以更新MySQL数据的页面。我希望“当前内容”已经在一个框中可见,以便可以更新。但是这个盒子太小了

我尝试过使用输入,但只在一行上有效,我想要更新的数据是一个很长的段落。我尝试使用textarea,但似乎不起作用

<input type="text" name="comment" value="<?php echo $currentCategory['comment']; ?>" />

<input  type="submit" name="submit" value="Save Review"  />
````````````````````````````````````````````````````````
<textarea type="text" name="comment" value="<?php echo $currentCategory['comment']; ?>" />
</textarea>



I want the paragraph to fit in the box.

正如注释中指出的那样,您编写的代码是错误的。你应该这样写:

<textarea type="text" name="comment"/>
  <?php echo $currentCategory['comment']; ?>
</textarea>

Textarea的工作方式与其他输入不同。将值放在textarea标记之间:
<textarea type="text" name="comment" readonly />
  <?php echo $currentCategory['comment']; ?>
</textarea>