Setting value of a HTML form textarea?
<textarea name="message" cols="40" rows="6"><?=$message?></textarea>
Note: Make sure $message
is properly sanitized and that short_open_tag
is enabled. Otherwise, @fabric's accepted answer is a better answer.
Textarea has no value. You need to insert your message between the opening and closing tags.
<textarea><?php echo htmlspecialchars($message); ?></textarea>