I am trying to keep a textbox and textarea content in its field after a form submission
text Box code:
<div class="response">
<span>
<input class="textbox" id="textbox1" name="textbox1" type="text"
value="<?php if(isset($_POST['textbox1'])) {
echo htmlentities ($_POST['textbox1']); }?>" />
</span> </div>
text area code:
<div class="response">
<span>
<textarea class="textarea" id="textarea1"
name="textarea1" type="text"
value="<?php if(isset($_POST['textarea1'])) {
echo htmlentities ($_POST['textarea1']); }?>" >
</textarea>
</span>
</div>
textbox code is working fine, but I am not able to keep the text area content.
try this
You must add code as below,
Textarea does not have value attribute.
So add
PHP
code between opening and closingtextarea
tag.