简体   繁体   English

如何将接收到的文本从数据库嵌入到文本区域

[英]How to embed a received text from database to textarea

I am using 我在用

nicEdit-latest.js nicEdit-latest.js

editor in my website to add some text to database , my problem is when i want to edit that text , it deosn't appear. 我网站上的编辑器向数据库中添加一些文本,我的问题是当我想编辑该文本时,它消失了。

<textarea name="body" value=" <?php echo $my_text ;?> " ></textarea>

You need to place text in between the textarea tags. 您需要在textarea标签之间放置文本。 Not like value="$var", but like this: 不像value =“ $ var”,而是这样的:

<textarea name="body"><?php echo $my_text ;?> </textarea>

The text of a textarea is put inside the tags textarea , not inside the attribute "value". textarea的文本放在标签textarea ,而不在属性“ value”内。

Like this: 像这样:

<textarea name="body"><?php echo $my_text; ?></textarea>

But i think maybe the problem isn't there. 但是我认为也许问题不存在。 Check if the variable my_text was declared and debug the code. 检查是否声明了变量my_text并调试代码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM