Skizit Skizit - 1 year ago 106
HTML Question

Setting value of a HTML form textarea?

I'm using the following to set the value of a text area..

$message = $_REQUEST['message'];
<TEXTAREA NAME="message" COLS=40 ROWS=6 value="<?=$message;?>"></TEXTAREA><br/><br/>
<input type="hidden" name="MAX_FILE_SIZE" value="1000000" />

but it doesn’t appear to be working. The value of message is not null. Does anyone have any idea why it's not filling the value?

Answer Source

Textarea has no value. You need to insert your message between the opening and closing tags.

<textarea><?php echo htmlspecialchars($message); ?></textarea>
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download