php - I cannot echo text from sql table into input textarea box correctly
Get the solution ↓↓↓Solution:
Change this line:
<textarea id="content" name="content" value="<?php echo $content ?>"></textarea>
to
<textarea id="content" name="content"><?php echo $content; ?></textarea>
and try again.
Explanation:texarea
don't havevalue
attribute in it. The value you see is the innerHTML oftextarea
. So what ever you want to print is between<textarea><?php echo $content; ?></textarea>
Answer
Solution:
There is no value attribute for the textarea element, the value must be placed inside the textarea element.
This is should be your solution:
<?php echo $content ?>
<form action="update.php" method="post" enctype="multipart/form-data">
<div id="div_content">
<label id="label_content">Content</label>
<textarea id="content" name="content"><?php echo $content; ?></textarea>
</div>
</form>
Share solution ↓
Additional Information:
Link To Answer People are also looking for solutions of the problem: a non-numeric value encountered
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.